Trait canvas::canvas_data::GenericDrawTarget

source ·
pub trait GenericDrawTarget {
Show 22 methods // Required methods fn clear_rect(&mut self, rect: &Rect<f32>); fn copy_surface( &mut self, surface: SourceSurface, source: Rect<i32>, destination: Point2D<i32>, ); fn create_gradient_stops( &self, gradient_stops: Vec<GradientStop>, ) -> GradientStops; fn create_path_builder(&self) -> Box<dyn GenericPathBuilder>; fn create_similar_draw_target( &self, size: &Size2D<i32>, ) -> Box<dyn GenericDrawTarget>; fn create_source_surface_from_data( &self, data: &[u8], ) -> Option<SourceSurface>; fn draw_surface( &mut self, surface: SourceSurface, dest: Rect<f64>, source: Rect<f64>, filter: Filter, draw_options: &DrawOptions, ); fn draw_surface_with_shadow( &self, surface: SourceSurface, dest: &Point2D<f32>, color: &Color, offset: &Vector2D<f32>, sigma: f32, operator: CompositionOp, ); fn fill( &mut self, path: &Path, pattern: Pattern<'_>, draw_options: &DrawOptions, ); fn fill_text( &mut self, text_runs: Vec<TextRun>, start: Point2D<f32>, pattern: &Pattern<'_>, draw_options: &DrawOptions, ); fn fill_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, draw_options: Option<&DrawOptions>, ); fn get_size(&self) -> Size2D<i32>; fn get_transform(&self) -> Transform2D<f32>; fn pop_clip(&mut self); fn push_clip(&mut self, path: &Path); fn set_transform(&mut self, matrix: &Transform2D<f32>); fn snapshot(&self) -> SourceSurface; fn stroke( &mut self, path: &Path, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, ); fn stroke_line( &mut self, start: Point2D<f32>, end: Point2D<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, ); fn stroke_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, ); fn snapshot_data(&self, f: &dyn Fn(&[u8]) -> Vec<u8>) -> Vec<u8> ; fn snapshot_data_owned(&self) -> Vec<u8> ;
}

Required Methods§

source

fn clear_rect(&mut self, rect: &Rect<f32>)

source

fn copy_surface( &mut self, surface: SourceSurface, source: Rect<i32>, destination: Point2D<i32>, )

source

fn create_gradient_stops( &self, gradient_stops: Vec<GradientStop>, ) -> GradientStops

source

fn create_path_builder(&self) -> Box<dyn GenericPathBuilder>

source

fn create_similar_draw_target( &self, size: &Size2D<i32>, ) -> Box<dyn GenericDrawTarget>

source

fn create_source_surface_from_data(&self, data: &[u8]) -> Option<SourceSurface>

source

fn draw_surface( &mut self, surface: SourceSurface, dest: Rect<f64>, source: Rect<f64>, filter: Filter, draw_options: &DrawOptions, )

source

fn draw_surface_with_shadow( &self, surface: SourceSurface, dest: &Point2D<f32>, color: &Color, offset: &Vector2D<f32>, sigma: f32, operator: CompositionOp, )

source

fn fill( &mut self, path: &Path, pattern: Pattern<'_>, draw_options: &DrawOptions, )

source

fn fill_text( &mut self, text_runs: Vec<TextRun>, start: Point2D<f32>, pattern: &Pattern<'_>, draw_options: &DrawOptions, )

source

fn fill_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, draw_options: Option<&DrawOptions>, )

source

fn get_size(&self) -> Size2D<i32>

source

fn get_transform(&self) -> Transform2D<f32>

source

fn pop_clip(&mut self)

source

fn push_clip(&mut self, path: &Path)

source

fn set_transform(&mut self, matrix: &Transform2D<f32>)

source

fn snapshot(&self) -> SourceSurface

source

fn stroke( &mut self, path: &Path, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source

fn stroke_line( &mut self, start: Point2D<f32>, end: Point2D<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source

fn stroke_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source

fn snapshot_data(&self, f: &dyn Fn(&[u8]) -> Vec<u8>) -> Vec<u8>

source

fn snapshot_data_owned(&self) -> Vec<u8>

Implementations on Foreign Types§

source§

impl GenericDrawTarget for DrawTarget

source§

fn clear_rect(&mut self, rect: &Rect<f32>)

source§

fn copy_surface( &mut self, surface: SourceSurface, source: Rect<i32>, destination: Point2D<i32>, )

source§

fn create_gradient_stops( &self, gradient_stops: Vec<GradientStop>, ) -> GradientStops

source§

fn create_path_builder(&self) -> Box<dyn GenericPathBuilder>

source§

fn create_similar_draw_target( &self, size: &Size2D<i32>, ) -> Box<dyn GenericDrawTarget>

source§

fn create_source_surface_from_data(&self, data: &[u8]) -> Option<SourceSurface>

source§

fn draw_surface( &mut self, surface: SourceSurface, dest: Rect<f64>, source: Rect<f64>, filter: Filter, draw_options: &DrawOptions, )

source§

fn draw_surface_with_shadow( &self, _surface: SourceSurface, _dest: &Point2D<f32>, _color: &Color, _offset: &Vector2D<f32>, _sigma: f32, _operator: CompositionOp, )

source§

fn fill( &mut self, path: &Path, pattern: Pattern<'_>, draw_options: &DrawOptions, )

source§

fn fill_text( &mut self, text_runs: Vec<TextRun>, start: Point2D<f32>, pattern: &Pattern<'_>, draw_options: &DrawOptions, )

source§

fn fill_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, draw_options: Option<&DrawOptions>, )

source§

fn get_size(&self) -> Size2D<i32>

source§

fn get_transform(&self) -> Transform2D<f32>

source§

fn pop_clip(&mut self)

source§

fn push_clip(&mut self, path: &Path)

source§

fn set_transform(&mut self, matrix: &Transform2D<f32>)

source§

fn snapshot(&self) -> SourceSurface

source§

fn stroke( &mut self, path: &Path, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source§

fn stroke_line( &mut self, start: Point2D<f32>, end: Point2D<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source§

fn stroke_rect( &mut self, rect: &Rect<f32>, pattern: Pattern<'_>, stroke_options: &StrokeOptions, draw_options: &DrawOptions, )

source§

fn snapshot_data(&self, f: &dyn Fn(&[u8]) -> Vec<u8>) -> Vec<u8>

source§

fn snapshot_data_owned(&self) -> Vec<u8>

Implementors§