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> ⓘ;
}