Skip to main content

OutlineSink

Trait OutlineSink 

Source
pub trait OutlineSink {
    // Required methods
    fn move_to(&mut self, to: Point2D<f32, Px>);
    fn line_to(&mut self, to: Point2D<f32, Px>);
    fn quadratic_curve_to(
        &mut self,
        ctrl: Point2D<f32, Px>,
        to: Point2D<f32, Px>,
    );
    fn cubic_curve_to(
        &mut self,
        ctrl: (Point2D<f32, Px>, Point2D<f32, Px>),
        to: Point2D<f32, Px>,
    );
    fn close(&mut self);
}
Expand description

Receives Bézier path rendering commands from Font::outline.

The points are relative to the baseline, negative values under, positive over.

Required Methods§

Source

fn move_to(&mut self, to: Point2D<f32, Px>)

Moves the pen to a point.

Source

fn line_to(&mut self, to: Point2D<f32, Px>)

Draws a line to a point.

Source

fn quadratic_curve_to(&mut self, ctrl: Point2D<f32, Px>, to: Point2D<f32, Px>)

Draws a quadratic Bézier curve to a point.

Source

fn cubic_curve_to( &mut self, ctrl: (Point2D<f32, Px>, Point2D<f32, Px>), to: Point2D<f32, Px>, )

Draws a cubic Bézier curve to a point.

The ctrl is a line (from, to).

Source

fn close(&mut self)

Closes the path, returning to the first point in it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§