Struct piet_cairo::CairoRenderContext [−][src]
pub struct CairoRenderContext<'a> { /* fields omitted */ }
Implementations
Create a new Cairo back-end.
At the moment, it uses the “toy text API” for text layout, but when we change to a more sophisticated text layout approach, we’ll probably need a factory for that as an additional argument.
Trait Implementations
fn make_brush<'b>(
&'b self,
_piet: &mut CairoRenderContext<'_>,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
type TextLayout = CairoTextLayout
type TextLayout = CairoTextLayout
The type use to represent text layout objects.
type Image = CairoImage
type Image = CairoImage
The associated type of an image.
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