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 mask to use. If set, no pixel outside of this rectangle (in screen space) will be written to as a result of rendering.

Stencil test to use. If None, no stencil testing is done.

Blend function to use. If None, blending is disabled.

Methods

impl DrawState
[src]

[src]

Uses alpha blending.

[src]

Draws to stencil buffer with value 255. This can be used for clipping.

[src]

Tests against stencil buffer with value 255. Draws inside the shape defined by stencil buffer.

[src]

Tests against stencil buffer with value 255. Draws outside the shape defined by stencil buffer.

[src]

Sets blending.

[src]

Sets scissor [x, y, w, h].

Trait Implementations

impl Copy for DrawState
[src]

impl Clone for DrawState
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for DrawState
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for DrawState
[src]

[src]

Formats the value using the given formatter.

impl PartialOrd for DrawState
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Default for DrawState
[src]

[src]

Returns the "default value" for a type. Read more