DrawRoundedImpl

Trait DrawRoundedImpl 

Source
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§

Source

fn rounded_line( &mut self, pass: PassId, p1: Vec2, p2: Vec2, radius: f32, col: Rgba, )

Draw a line with rounded ends and uniform colour

Source

fn circle(&mut self, pass: PassId, rect: Quad, inner_radius: f32, col: Rgba)

Draw a circle or oval of uniform colour

Source

fn circle_2col(&mut self, pass: PassId, rect: Quad, col1: Rgba, col2: Rgba)

Draw a circle or oval with two colours

Source

fn rounded_frame( &mut self, pass: PassId, outer: Quad, inner: Quad, r1: f32, col: Rgba, )

Draw a frame with rounded corners and uniform colour

Source

fn rounded_frame_2col( &mut self, pass: PassId, outer: Quad, inner: Quad, c1: Rgba, c2: Rgba, )

Draw a frame with rounded corners with two colours

Implementors§