Struct radiant_rs::support::DrawBuilder
[−]
[src]
#[must_use]pub struct DrawBuilder<'a, T: 'a> { /* fields omitted */ }
A rectangle builder.
Obtained from Renderer::rect()
or Renderer::fill()
Methods
impl<'a, T> DrawBuilder<'a, T>
[src]
The following implementations are available when drawing with Renderer::rect()
or Renderer::fill()
.
fn color(self, color: Color) -> Self
[src]
Sets a color for drawing. Defaults to white. If a texture is supplied in addtion to the color, each fragment will be computed from texel color * color.
fn texture(self, texture: &'a Texture) -> Self
[src]
Sets the texture for drawing. If a color is supplied in addtion to the texture, each fragment will be computed from texel color * color.
fn blendmode(self, blendmode: BlendMode) -> Self
[src]
Sets the blendmode used to blend the source with the target.
fn program(self, program: &'a Program) -> Self
[src]
Sets the fragment shader program used to draw.
fn model_matrix(self, model_matrix: Mat4) -> Self
[src]
Sets a model matrix for drawing.
fn draw(self)
[src]
Draws the rectangle.
impl<'a> DrawBuilder<'a, DrawBuilderRect>
[src]
The following implementations are only available when drawing with Renderer::rect()
fn view_matrix(self, view_matrix: Mat4) -> Self
[src]
Sets a view matrix for drawing.
fn view_target(self) -> Self
[src]
Uses a view matrix that maps the dimensions of the target to the pixel-size of the target.
This is the default setting. It means that a point, e.g. (12., 34.) is mapped to the pixel (12, 34) on the target.
fn view_display(self) -> Self
[src]
Uses a view matrix that maps the dimensions of the display to the pixel-size of the target.
fn view_source(self) -> Self
[src]
Uses a view matrix that maps the dimensions of the source to the pixel-size of the target.
fn view_one(self) -> Self
[src]
Uses a matrix that maps the entire target to a rectangle of (0., 0., 1., 1.)
Trait Implementations
impl<'a, T: Clone + 'a> Clone for DrawBuilder<'a, T>
[src]
fn clone(&self) -> DrawBuilder<'a, T>
[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