Struct graphics::draw_state::DrawState
[−]
[src]
pub struct DrawState { pub scissor: Option<[u32; 4]>, pub stencil: Option<Stencil>, pub blend: Option<Blend>, }
Graphics draw state used for blending, clipping and stencil rendering.
Fields
scissor: Option<[u32; 4]>
Scissor mask to use. If set, no pixel outside of this rectangle (in screen space) will be written to as a result of rendering.
stencil: Option<Stencil>
Stencil test to use. If None, no stencil testing is done.
blend: Option<Blend>
Blend function to use. If None, blending is disabled.
Methods
impl DrawState
[src]
fn new_alpha() -> DrawState
Uses alpha blending.
fn new_clip() -> DrawState
Draws to stencil buffer with value 255. This can be used for clipping.
fn new_inside() -> DrawState
Tests against stencil buffer with value 255. Draws inside the shape defined by stencil buffer.
fn new_outside() -> DrawState
Tests against stencil buffer with value 255. Draws outside the shape defined by stencil buffer.
fn blend(self, blend: Blend) -> DrawState
Sets blending.
fn scissor(self, scissor: [u32; 4]) -> DrawState
Sets scissor [x, y, w, h]
.
Trait Implementations
impl Copy for DrawState
[src]
impl Clone for DrawState
[src]
fn clone(&self) -> DrawState
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for DrawState
[src]
fn eq(&self, __arg_0: &DrawState) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &DrawState) -> bool
This method tests for !=
.
impl Debug for DrawState
[src]
impl PartialOrd for DrawState
[src]
fn partial_cmp(&self, __arg_0: &DrawState) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &DrawState) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &DrawState) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &DrawState) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &DrawState) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more