pub trait DrawRoundedImpl: DrawImpl {
// Required methods
fn rounded_line(
&mut self,
pass: PassId,
p1: Vec2,
p2: Vec2,
radius: f32,
col: Rgba,
);
fn circle(&mut self, pass: PassId, rect: Quad, inner_radius: f32, col: Rgba);
fn circle_2col(&mut self, pass: PassId, rect: Quad, col1: Rgba, col2: Rgba);
fn rounded_frame(
&mut self,
pass: PassId,
outer: Quad,
inner: Quad,
r1: f32,
col: Rgba,
);
fn rounded_frame_2col(
&mut self,
pass: PassId,
outer: Quad,
inner: Quad,
c1: Rgba,
c2: Rgba,
);
}
Expand description
Implementation target for DrawRounded
This trait is an extension over DrawImpl
providing rounded shapes.
The primitives provided by this trait are partially transparent. If the implementation buffers draw commands, it should draw these primitives after solid primitives.
Required Methods§
Sourcefn rounded_line(
&mut self,
pass: PassId,
p1: Vec2,
p2: Vec2,
radius: f32,
col: Rgba,
)
fn rounded_line( &mut self, pass: PassId, p1: Vec2, p2: Vec2, radius: f32, col: Rgba, )
Draw a line with rounded ends and uniform colour
Sourcefn circle(&mut self, pass: PassId, rect: Quad, inner_radius: f32, col: Rgba)
fn circle(&mut self, pass: PassId, rect: Quad, inner_radius: f32, col: Rgba)
Draw a circle or oval of uniform colour
Sourcefn circle_2col(&mut self, pass: PassId, rect: Quad, col1: Rgba, col2: Rgba)
fn circle_2col(&mut self, pass: PassId, rect: Quad, col1: Rgba, col2: Rgba)
Draw a circle or oval with two colours