pub struct DrawSettings2D {
pub sprite: Option<SpriteRef>,
pub blend_mode: BlendMode,
pub texture_filter: TextureFilter,
pub clip_area: Option<[f32; 4]>,
}
Expand description
Various options for controlling how draw commands should be executed.
Fields§
§sprite: Option<SpriteRef>
The sprite used to draw the triangles. If None, rendering should fall back to the vertex colors.
blend_mode: BlendMode
The blending mode of the draw, i.e. how the pixels are mixed from this draw and any previous draws in the same area.
texture_filter: TextureFilter
The filtering mode used to stretch or squeeze the sprite when the rendering resolution doesn’t exactly match the sprite.
clip_area: Option<[f32; 4]>
The draw will only apply to pixels within this rectangle. Layout: [x, y, width, height]
.
Trait Implementations§
Source§impl Clone for DrawSettings2D
impl Clone for DrawSettings2D
Source§fn clone(&self) -> DrawSettings2D
fn clone(&self) -> DrawSettings2D
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DrawSettings2D
impl Debug for DrawSettings2D
Source§impl Default for DrawSettings2D
impl Default for DrawSettings2D
Source§fn default() -> DrawSettings2D
fn default() -> DrawSettings2D
Returns the “default value” for a type. Read more
Source§impl PartialEq for DrawSettings2D
impl PartialEq for DrawSettings2D
impl Copy for DrawSettings2D
impl StructuralPartialEq for DrawSettings2D
Auto Trait Implementations§
impl Freeze for DrawSettings2D
impl RefUnwindSafe for DrawSettings2D
impl Send for DrawSettings2D
impl Sync for DrawSettings2D
impl Unpin for DrawSettings2D
impl UnwindSafe for DrawSettings2D
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