pub(crate) trait GenericDrawTarget {
type SourceSurface;
Show 19 methods
// Required methods
fn new(size: Size2D<u32>) -> Self;
fn create_similar_draw_target(&self, size: &Size2D<i32>) -> Self;
fn clear_rect(&mut self, rect: &Rect<f32>, transform: Transform2D<f64>);
fn copy_surface(
&mut self,
surface: Self::SourceSurface,
source: Rect<i32>,
destination: Point2D<i32>,
);
fn create_source_surface_from_data(
&self,
data: Snapshot,
) -> Option<Self::SourceSurface>;
fn draw_surface(
&mut self,
surface: Self::SourceSurface,
dest: Rect<f64>,
source: Rect<f64>,
filter: Filter,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn draw_surface_with_shadow(
&self,
surface: Self::SourceSurface,
dest: &Point2D<f32>,
shadow_options: ShadowOptions,
composition_options: CompositionOptions,
);
fn fill(
&mut self,
path: &Path,
fill_rule: FillRule,
style: FillOrStrokeStyle,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn fill_text(
&mut self,
text_runs: Vec<TextRun>,
style: FillOrStrokeStyle,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn fill_rect(
&mut self,
rect: &Rect<f32>,
style: FillOrStrokeStyle,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn get_size(&self) -> Size2D<i32>;
fn pop_clip(&mut self);
fn push_clip(
&mut self,
path: &Path,
fill_rule: FillRule,
transform: Transform2D<f64>,
);
fn push_clip_rect(&mut self, rect: &Rect<i32>);
fn stroke(
&mut self,
path: &Path,
style: FillOrStrokeStyle,
line_options: LineOptions,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn stroke_rect(
&mut self,
rect: &Rect<f32>,
style: FillOrStrokeStyle,
line_options: LineOptions,
composition_options: CompositionOptions,
transform: Transform2D<f64>,
);
fn surface(&mut self) -> Self::SourceSurface;
fn image_descriptor_and_serializable_data(
&mut self,
) -> (ImageDescriptor, SerializableImageData);
fn snapshot(&mut self) -> Snapshot;
}
Required Associated Types§
type SourceSurface
Required Methods§
fn new(size: Size2D<u32>) -> Self
fn create_similar_draw_target(&self, size: &Size2D<i32>) -> Self
fn clear_rect(&mut self, rect: &Rect<f32>, transform: Transform2D<f64>)
fn copy_surface( &mut self, surface: Self::SourceSurface, source: Rect<i32>, destination: Point2D<i32>, )
fn create_source_surface_from_data( &self, data: Snapshot, ) -> Option<Self::SourceSurface>
fn draw_surface( &mut self, surface: Self::SourceSurface, dest: Rect<f64>, source: Rect<f64>, filter: Filter, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn draw_surface_with_shadow( &self, surface: Self::SourceSurface, dest: &Point2D<f32>, shadow_options: ShadowOptions, composition_options: CompositionOptions, )
fn fill( &mut self, path: &Path, fill_rule: FillRule, style: FillOrStrokeStyle, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn fill_text( &mut self, text_runs: Vec<TextRun>, style: FillOrStrokeStyle, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn fill_rect( &mut self, rect: &Rect<f32>, style: FillOrStrokeStyle, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn get_size(&self) -> Size2D<i32>
fn pop_clip(&mut self)
fn push_clip( &mut self, path: &Path, fill_rule: FillRule, transform: Transform2D<f64>, )
fn push_clip_rect(&mut self, rect: &Rect<i32>)
fn stroke( &mut self, path: &Path, style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn stroke_rect( &mut self, rect: &Rect<f32>, style: FillOrStrokeStyle, line_options: LineOptions, composition_options: CompositionOptions, transform: Transform2D<f64>, )
fn surface(&mut self) -> Self::SourceSurface
fn image_descriptor_and_serializable_data( &mut self, ) -> (ImageDescriptor, SerializableImageData)
fn snapshot(&mut self) -> Snapshot
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.