[−]Struct conrod_piston::draw::DrawState
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
pub fn new_alpha() -> DrawState
Uses alpha blending.
pub fn new_clip() -> DrawState
Draws to stencil buffer with value 255. This can be used for clipping.
pub fn new_inside() -> DrawState
Tests against stencil buffer with value 255. Draws inside the shape defined by stencil buffer.
pub fn new_outside() -> DrawState
Tests against stencil buffer with value 255. Draws outside the shape defined by stencil buffer.
pub fn blend(self, blend: Blend) -> DrawState
Sets blending.
pub fn scissor(self, scissor: [u32; 4]) -> DrawState
Sets scissor [x, y, w, h]
.
Trait Implementations
impl Default for DrawState
impl PartialEq<DrawState> for DrawState
impl PartialOrd<DrawState> for DrawState
fn partial_cmp(&self, other: &DrawState) -> Option<Ordering>
fn lt(&self, other: &DrawState) -> bool
fn le(&self, other: &DrawState) -> bool
fn gt(&self, other: &DrawState) -> bool
fn ge(&self, other: &DrawState) -> bool
impl Debug for DrawState
impl Clone for DrawState
fn clone(&self) -> DrawState
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for DrawState
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,