pub struct Layer<'a> { /* private fields */ }
Expand description
A reference to a single layer.
Implementations§
source§impl<'a> Layer<'a>
impl<'a> Layer<'a>
sourcepub fn flags(&self) -> LayerFlags
pub fn flags(&self) -> LayerFlags
Layer’s flags
sourcepub fn blend_mode(&self) -> BlendMode
pub fn blend_mode(&self) -> BlendMode
Blend mode of the layer. Describes how this layer is combined with the layers underneath it. See BlendMode for details.
sourcepub fn layer_type(&self) -> LayerType
pub fn layer_type(&self) -> LayerType
Describes whether this is a regular, group, or tilemap layer.
sourcepub fn is_tilemap(&self) -> bool
pub fn is_tilemap(&self) -> bool
Is this a tilemap layer?
sourcepub fn parent(&self) -> Option<Layer<'_>>
pub fn parent(&self) -> Option<Layer<'_>>
The parent of this layer, if any. For layers that are part of a group this returns the parent layer.
Does not indicate the blend order of layers (i.e., which layers are above or below).
sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Returns if this layer is visible. This requires that this layer and all of its parent layers are visible.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Layer<'a>
impl<'a> RefUnwindSafe for Layer<'a>
impl<'a> Send for Layer<'a>
impl<'a> Sync for Layer<'a>
impl<'a> Unpin for Layer<'a>
impl<'a> UnwindSafe for Layer<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more