[−][src]Struct codegame::prelude::Color
RGBA Color
Fields
r: TRed component
g: TGreen component
b: TBlue component
a: TAlpha (opacity) component
Implementations
impl<T> Color<T> where
T: ColorComponent, [src]
T: ColorComponent,
pub const WHITE: Color<T>[src]
pub const BLACK: Color<T>[src]
pub const GRAY: Color<T>[src]
pub const TRANSPARENT_WHITE: Color<T>[src]
pub const TRANSPARENT_BLACK: Color<T>[src]
pub const RED: Color<T>[src]
pub const GREEN: Color<T>[src]
pub const BLUE: Color<T>[src]
pub const CYAN: Color<T>[src]
pub const MAGENTA: Color<T>[src]
pub const YELLOW: Color<T>[src]
impl<T> Color<T> where
T: ColorComponent, [src]
T: ColorComponent,
pub fn rgb(r: T, g: T, b: T) -> Color<T>[src]
pub fn rgba(r: T, g: T, b: T, a: T) -> Color<T>[src]
pub fn convert<U>(self) -> Color<U> where
U: ColorComponent, [src]
U: ColorComponent,
Methods from Deref<Target = [T; 4]>
pub fn as_slice(&self) -> &[T]ⓘ[src]
🔬 This is a nightly-only experimental API. (
array_methods)Returns a slice containing the entire array. Equivalent to &s[..].
pub fn as_mut_slice(&mut self) -> &mut [T]ⓘ[src]
🔬 This is a nightly-only experimental API. (
array_methods)Returns a mutable slice containing the entire array. Equivalent to
&mut s[..].
Trait Implementations
impl<T> ApproxEq for Color<T> where
T: ApproxEq + ColorComponent, [src]
T: ApproxEq + ColorComponent,
pub fn approx_distance_to(&self, other: &Color<T>) -> f32[src]
fn approx_eq(&self, other: &Self) -> bool[src]
fn approx_eq_eps(&self, other: &Self, eps: f32) -> bool[src]
impl AsUniform for Color<f32>
impl<T> Clone for Color<T> where
T: Clone, [src]
T: Clone,
impl<T> Copy for Color<T> where
T: Copy, [src]
T: Copy,
impl<T> Debug for Color<T> where
T: Debug, [src]
T: Debug,
impl<T> Deref for Color<T> where
T: ColorComponent, [src]
T: ColorComponent,
impl<T> DerefMut for Color<T> where
T: ColorComponent, [src]
T: ColorComponent,
impl<'de, T> Deserialize<'de> for Color<T> where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Color<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<Color<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<T> Display for Color<T> where
T: ColorComponent, [src]
T: ColorComponent,
impl<T> Eq for Color<T> where
T: ColorComponent + Eq, [src]
T: ColorComponent + Eq,
impl<T> PartialEq<Color<T>> for Color<T> where
T: ColorComponent + Eq, [src]
T: ColorComponent + Eq,
pub fn eq(&self, other: &Color<T>) -> bool[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl RenderbufferPixel for Color<f32>
impl<T> Serialize for Color<T> where
T: Serialize, [src]
T: Serialize,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl TexturePixel for Color<f32>
impl<T> Trans for Color<T> where
T: Trans, [src]
T: Trans,
pub fn create_schema() -> Schema[src]
pub fn write_to(&self, writer: &mut dyn Write) -> Result<(), Error>[src]
pub fn read_from(reader: &mut dyn Read) -> Result<Color<T>, Error>[src]
impl VertexAttribute for Color<f32>
pub const SIZE: usize
pub const TYPE: AttributeType
Auto Trait Implementations
impl<T> RefUnwindSafe for Color<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Color<T> where
T: Send,
T: Send,
impl<T> Sync for Color<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Color<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Color<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> ApproxEq for T where
T: Float, [src]
T: Float,
pub fn approx_distance_to(&self, other: &T) -> f32[src]
fn approx_eq(&self, other: &Self) -> bool[src]
fn approx_eq_eps(&self, other: &Self, eps: f32) -> bool[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ[src]
impl<T> Configurable for T where
T: Clone + ToString, [src]
T: Clone + ToString,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> Diff for T where
T: 'static + PartialEq<T> + Send + Copy + Sync + for<'de> Deserialize<'de> + Serialize + Trans, [src]
T: 'static + PartialEq<T> + Send + Copy + Sync + for<'de> Deserialize<'de> + Serialize + Trans,
impl<T> DynClone for T where
T: Clone, [src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Message for T where
T: 'static + Send + Debug + for<'de> Deserialize<'de> + Serialize, [src]
T: 'static + Send + Debug + for<'de> Deserialize<'de> + Serialize,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a Tⓘ
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut Tⓘ
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Uniform for T where
T: AsUniform,
T: AsUniform,
pub fn apply(&self, gl: &Context, info: &UniformInfo)
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,