Trait flo_animation::Brush
[−]
[src]
pub trait Brush: Send + Sync { fn brush_points_for_raw_points(
&self,
raw_points: &[RawPoint]
) -> Vec<BrushPoint>; fn prepare_to_render<'a>(
&'a self,
properties: &'a BrushProperties
) -> Box<Iterator<Item = Draw> + 'a>; fn render_brush<'a>(
&'a self,
properties: &'a BrushProperties,
points: &'a Vec<BrushPoint>
) -> Box<Iterator<Item = Draw> + 'a>; fn to_definition(&self) -> (BrushDefinition, BrushDrawingStyle); }
Trait implemented by things that can draw brush strokes
Required Methods
fn brush_points_for_raw_points(
&self,
raw_points: &[RawPoint]
) -> Vec<BrushPoint>
&self,
raw_points: &[RawPoint]
) -> Vec<BrushPoint>
Returns the brush points for rendering given a particular set of raw points
fn prepare_to_render<'a>(
&'a self,
properties: &'a BrushProperties
) -> Box<Iterator<Item = Draw> + 'a>
&'a self,
properties: &'a BrushProperties
) -> Box<Iterator<Item = Draw> + 'a>
One or more brush strokes of this type are about to be rendered. This brush should set up the graphics context appropriately.
fn render_brush<'a>(
&'a self,
properties: &'a BrushProperties,
points: &'a Vec<BrushPoint>
) -> Box<Iterator<Item = Draw> + 'a>
&'a self,
properties: &'a BrushProperties,
points: &'a Vec<BrushPoint>
) -> Box<Iterator<Item = Draw> + 'a>
Renders a brush stroke to the specified graphics context
fn to_definition(&self) -> (BrushDefinition, BrushDrawingStyle)
Retrieves the definition for this brush
Implementors
impl Brush for SimpleBrush
impl Brush for InkBrush