Struct piet_svg::RenderContext [−][src]
pub struct RenderContext { /* fields omitted */ }
Expand description
piet::RenderContext
for generating SVG images
Implementations
Trait Implementations
fn make_brush<'b>(
&'b self,
_piet: &mut RenderContext,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
type TextLayout = TextLayout
type TextLayout = TextLayout
The type use to represent text layout objects.
Create a new brush resource. Read more
Create a new gradient brush.
Fill a [Shape
], using the non-zero fill rule. Read more
Fill a shape, using the even-odd fill rule. Read more
Stroke a [Shape
], using the default StrokeStyle
.
fn stroke_styled(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
fn stroke_styled(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
Stroke a [Shape
], providing a custom StrokeStyle
.
Draw a TextLayout
. Read more
Returns the transformations currently applied to the context.
fn draw_image(
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
fn draw_image(
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
fn draw_image_area(
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
fn draw_image_area(
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
Draw a rectangle with Gaussian blur. Read more