[][src]Struct olc_pixel_game_engine::layer::LayerDesc

#[repr(C)]pub struct LayerDesc {
    pub id: u8,
    pub offset: Vf2d,
    pub scale: Vf2d,
    pub tint: Pixel,
    pub shown: bool,
    pub sprite: Sprite,
}

Mirror of the olc::LayerDesc. Contains layer description, must be treated as read-only since no modifications to the object are propagated back to the engine. Does not support Clone and Copy, used as a container for layer information.

Fields

id: u8

Layer id.

offset: Vf2d

Layer offset.

scale: Vf2d

Layer scale.

tint: Pixel

Layer tint.

shown: bool

Whether or not this layer is enabled to be rendered.

sprite: Sprite

Implementations

impl LayerDesc[src]

pub fn get_pixel(&self, x: i32, y: i32) -> Pixel[src]

Returns the pixel set for (x, y) coordinates.

Trait Implementations

impl Debug for LayerDesc[src]

impl PartialEq<LayerDesc> for LayerDesc[src]

impl StructuralPartialEq for LayerDesc[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.