Struct conrod::backend::piston::gfx::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]
pub fn new_alpha() -> DrawState
[src]
Uses alpha blending.
pub fn new_clip() -> DrawState
[src]
Draws to stencil buffer with value 255. This can be used for clipping.
pub fn new_inside() -> DrawState
[src]
Tests against stencil buffer with value 255. Draws inside the shape defined by stencil buffer.
pub fn new_outside() -> DrawState
[src]
Tests against stencil buffer with value 255. Draws outside the shape defined by stencil buffer.
pub fn blend(self, blend: Blend) -> DrawState
[src]
Sets blending.
pub fn scissor(self, scissor: [u32; 4]) -> DrawState
[src]
Sets scissor [x, y, w, h]
.
Trait Implementations
impl Default for DrawState
[src]
impl PartialOrd<DrawState> for DrawState
[src]
fn partial_cmp(&self, __arg_0: &DrawState) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &DrawState) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &DrawState) -> bool
[src]
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
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &DrawState) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for DrawState
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Copy for DrawState
[src]
impl Clone for DrawState
[src]
fn clone(&self) -> DrawState
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more