pub trait Device<'a> {
// Required methods
fn stroke_path(
&mut self,
path: &BezPath,
transform: Affine,
paint: &Paint<'a>,
stroke_props: &StrokeProps,
);
fn set_soft_mask(&mut self, mask: Option<SoftMask<'a>>);
fn fill_path(
&mut self,
path: &BezPath,
transform: Affine,
paint: &Paint<'a>,
fill_rule: FillRule,
);
fn push_clip_path(&mut self, clip_path: &ClipPath);
fn push_transparency_group(
&mut self,
opacity: f32,
mask: Option<SoftMask<'a>>,
);
fn fill_glyph(
&mut self,
glyph: &Glyph<'a>,
transform: Affine,
glyph_transform: Affine,
paint: &Paint<'a>,
);
fn stroke_glyph(
&mut self,
glyph: &Glyph<'a>,
transform: Affine,
glyph_transform: Affine,
paint: &Paint<'a>,
stroke_props: &StrokeProps,
);
fn draw_rgba_image(
&mut self,
image: RgbData,
transform: Affine,
alpha: Option<LumaData>,
);
fn draw_stencil_image(
&mut self,
stencil: LumaData,
transform: Affine,
paint: &Paint<'a>,
);
fn pop_clip_path(&mut self);
fn pop_transparency_group(&mut self);
}Expand description
A trait for a device that can be used to process PDF drawing instructions.
Required Methods§
Sourcefn stroke_path(
&mut self,
path: &BezPath,
transform: Affine,
paint: &Paint<'a>,
stroke_props: &StrokeProps,
)
fn stroke_path( &mut self, path: &BezPath, transform: Affine, paint: &Paint<'a>, stroke_props: &StrokeProps, )
Stroke a path.
Sourcefn set_soft_mask(&mut self, mask: Option<SoftMask<'a>>)
fn set_soft_mask(&mut self, mask: Option<SoftMask<'a>>)
Set the properties for future stroking operations. Set a soft mask to be used for future drawing instructions.
Sourcefn fill_path(
&mut self,
path: &BezPath,
transform: Affine,
paint: &Paint<'a>,
fill_rule: FillRule,
)
fn fill_path( &mut self, path: &BezPath, transform: Affine, paint: &Paint<'a>, fill_rule: FillRule, )
Fill a path.
Sourcefn push_clip_path(&mut self, clip_path: &ClipPath)
fn push_clip_path(&mut self, clip_path: &ClipPath)
Push a new clip path to the clip stack.
Sourcefn push_transparency_group(&mut self, opacity: f32, mask: Option<SoftMask<'a>>)
fn push_transparency_group(&mut self, opacity: f32, mask: Option<SoftMask<'a>>)
Push a new transparency group to the blend stack.
Sourcefn fill_glyph(
&mut self,
glyph: &Glyph<'a>,
transform: Affine,
glyph_transform: Affine,
paint: &Paint<'a>,
)
fn fill_glyph( &mut self, glyph: &Glyph<'a>, transform: Affine, glyph_transform: Affine, paint: &Paint<'a>, )
Fill a glyph.
Sourcefn stroke_glyph(
&mut self,
glyph: &Glyph<'a>,
transform: Affine,
glyph_transform: Affine,
paint: &Paint<'a>,
stroke_props: &StrokeProps,
)
fn stroke_glyph( &mut self, glyph: &Glyph<'a>, transform: Affine, glyph_transform: Affine, paint: &Paint<'a>, stroke_props: &StrokeProps, )
Stroke a glyph.
Sourcefn draw_rgba_image(
&mut self,
image: RgbData,
transform: Affine,
alpha: Option<LumaData>,
)
fn draw_rgba_image( &mut self, image: RgbData, transform: Affine, alpha: Option<LumaData>, )
Draw an RGBA image.
Sourcefn draw_stencil_image(
&mut self,
stencil: LumaData,
transform: Affine,
paint: &Paint<'a>,
)
fn draw_stencil_image( &mut self, stencil: LumaData, transform: Affine, paint: &Paint<'a>, )
Draw a stencil image with the given paint.
Sourcefn pop_clip_path(&mut self)
fn pop_clip_path(&mut self)
Pop the last clip path from the clip stack.
Sourcefn pop_transparency_group(&mut self)
fn pop_transparency_group(&mut self)
Pop the last transparency group from the blend stack.