pub struct VelloScenePainter<'r, 's> { /* private fields */ }Implementations§
Source§impl VelloScenePainter<'_, '_>
impl VelloScenePainter<'_, '_>
pub fn new<'s>(scene: &'s mut Scene) -> VelloScenePainter<'static, 's>
Trait Implementations§
Source§impl PaintScene for VelloScenePainter<'_, '_>
impl PaintScene for VelloScenePainter<'_, '_>
Source§fn push_layer(
&mut self,
blend: impl Into<BlendMode>,
alpha: f32,
transform: Affine,
clip: &impl Shape,
)
fn push_layer( &mut self, blend: impl Into<BlendMode>, alpha: f32, transform: Affine, clip: &impl Shape, )
Pushes a new layer clipped by the specified shape and composed with previous layers using the specified blend mode.
Every drawing command after this call will be clipped by the shape until the layer is popped.
However, the transforms are not saved or modified by the layer stack.
Source§fn push_clip_layer(&mut self, transform: Affine, clip: &impl Shape)
fn push_clip_layer(&mut self, transform: Affine, clip: &impl Shape)
Pushes a new clip layer clipped by the specified shape.
Every drawing command after this call will be clipped by the shape until the layer is popped.
However, the transforms are not saved or modified by the layer stack.
Source§fn stroke<'a>(
&mut self,
style: &Stroke,
transform: Affine,
paint_ref: impl Into<PaintRef<'a>>,
brush_transform: Option<Affine>,
shape: &impl Shape,
)
fn stroke<'a>( &mut self, style: &Stroke, transform: Affine, paint_ref: impl Into<PaintRef<'a>>, brush_transform: Option<Affine>, shape: &impl Shape, )
Strokes a shape using the specified style and brush.
Source§fn fill<'a>(
&mut self,
style: Fill,
transform: Affine,
paint: impl Into<PaintRef<'a>>,
brush_transform: Option<Affine>,
shape: &impl Shape,
)
fn fill<'a>( &mut self, style: Fill, transform: Affine, paint: impl Into<PaintRef<'a>>, brush_transform: Option<Affine>, shape: &impl Shape, )
Fills a shape using the specified style and brush.
Source§fn draw_glyphs<'a, 's: 'a>(
&'a mut self,
font: &'a FontData,
font_size: f32,
hint: bool,
normalized_coords: &'a [NormalizedCoord],
style: impl Into<StyleRef<'a>>,
paint: impl Into<PaintRef<'a>>,
brush_alpha: f32,
transform: Affine,
glyph_transform: Option<Affine>,
glyphs: impl Iterator<Item = Glyph>,
)
fn draw_glyphs<'a, 's: 'a>( &'a mut self, font: &'a FontData, font_size: f32, hint: bool, normalized_coords: &'a [NormalizedCoord], style: impl Into<StyleRef<'a>>, paint: impl Into<PaintRef<'a>>, brush_alpha: f32, transform: Affine, glyph_transform: Option<Affine>, glyphs: impl Iterator<Item = Glyph>, )
Returns a builder for encoding a glyph run.
Source§fn draw_box_shadow(
&mut self,
transform: Affine,
rect: Rect,
brush: Color,
radius: f64,
std_dev: f64,
)
fn draw_box_shadow( &mut self, transform: Affine, rect: Rect, brush: Color, radius: f64, std_dev: f64, )
Draw a rounded rectangle blurred with a gaussian filter.
Source§fn draw_image(&mut self, image: ImageBrush<&ImageData>, transform: Affine)
fn draw_image(&mut self, image: ImageBrush<&ImageData>, transform: Affine)
Utility method to draw an image at it’s natural size. For more advanced image drawing use the
fill methodAuto Trait Implementations§
impl<'r, 's> Freeze for VelloScenePainter<'r, 's>
impl<'r, 's> !RefUnwindSafe for VelloScenePainter<'r, 's>
impl<'r, 's> !Send for VelloScenePainter<'r, 's>
impl<'r, 's> !Sync for VelloScenePainter<'r, 's>
impl<'r, 's> Unpin for VelloScenePainter<'r, 's>
impl<'r, 's> !UnwindSafe for VelloScenePainter<'r, 's>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more