[−][src]Trait kas::draw::DrawShaded
Drawing commands for shaded shapes
This trait is an extension over Draw
providing solid shaded shapes.
Some drawing primitives (the "round" ones) are partially transparent. If the implementation buffers draw commands, it should draw these primitives after solid primitives.
These are parameterised via a pair of normals, (inner, outer)
. These may
have values from the closed range [-1, 1]
, where -1 points inwards,
0 is perpendicular to the screen towards the viewer, and 1 points outwards.
Required methods
pub fn shaded_square(
&mut self,
pass: Pass,
rect: Quad,
norm: (f32, f32),
col: Colour
)
[src]
&mut self,
pass: Pass,
rect: Quad,
norm: (f32, f32),
col: Colour
)
Add a shaded square to the draw buffer
pub fn shaded_circle(
&mut self,
pass: Pass,
rect: Quad,
norm: (f32, f32),
col: Colour
)
[src]
&mut self,
pass: Pass,
rect: Quad,
norm: (f32, f32),
col: Colour
)
Add a shaded circle to the draw buffer
pub fn shaded_square_frame(
&mut self,
pass: Pass,
outer: Quad,
inner: Quad,
norm: (f32, f32),
col: Colour
)
[src]
&mut self,
pass: Pass,
outer: Quad,
inner: Quad,
norm: (f32, f32),
col: Colour
)
Add a square shaded frame to the draw buffer.
pub fn shaded_round_frame(
&mut self,
pass: Pass,
outer: Quad,
inner: Quad,
norm: (f32, f32),
col: Colour
)
[src]
&mut self,
pass: Pass,
outer: Quad,
inner: Quad,
norm: (f32, f32),
col: Colour
)
Add a rounded shaded frame to the draw buffer.