[−][src]Struct piet_svg::RenderContext
piet::RenderContext
for generating SVG images
Implementations
impl RenderContext
[src]
pub fn new() -> Self
[src]
Construct an empty RenderContext
pub fn write(&self, writer: impl Write) -> Result<()>
[src]
Write graphics rendered so far to an std::io::Write
impl, such as std::fs::File
Additional rendering can be done afterwards.
Trait Implementations
impl IntoBrush<RenderContext> for Brush
[src]
pub fn make_brush<'b>(
&'b self,
_piet: &mut RenderContext,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
[src]
&'b self,
_piet: &mut RenderContext,
_bbox: impl FnOnce() -> Rect
) -> Cow<'b, Brush>
impl RenderContext for RenderContext
[src]
type Brush = Brush
The type of a "brush". Read more
type Text = Text
An associated factory for creating text layouts and related resources.
type TextLayout = TextLayout
type Image = SvgImage
The associated type of an image.
pub fn status(&mut self) -> Result<(), Error>
[src]
pub fn clear(&mut self, color: Color)
[src]
pub fn solid_brush(&mut self, color: Color) -> Brush
[src]
pub fn gradient(
&mut self,
gradient: impl Into<FixedGradient>
) -> Result<Brush, Error>
[src]
&mut self,
gradient: impl Into<FixedGradient>
) -> Result<Brush, Error>
pub fn fill(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
[src]
pub fn fill_even_odd(&mut self, shape: impl Shape, brush: &impl IntoBrush<Self>)
[src]
pub fn clip(&mut self, shape: impl Shape)
[src]
pub fn stroke(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64
)
[src]
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64
)
pub fn stroke_styled(
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
[src]
&mut self,
shape: impl Shape,
brush: &impl IntoBrush<Self>,
width: f64,
style: &StrokeStyle
)
pub fn text(&mut self) -> &mut Self::Text
[src]
pub fn draw_text(&mut self, _layout: &Self::TextLayout, _pos: impl Into<Point>)
[src]
pub fn save(&mut self) -> Result<(), Error>
[src]
pub fn restore(&mut self) -> Result<(), Error>
[src]
pub fn finish(&mut self) -> Result<(), Error>
[src]
pub fn transform(&mut self, transform: Affine)
[src]
pub fn current_transform(&self) -> Affine
[src]
pub fn make_image(
&mut self,
_width: usize,
_height: usize,
_buf: &[u8],
_format: ImageFormat
) -> Result<Self::Image, Error>
[src]
&mut self,
_width: usize,
_height: usize,
_buf: &[u8],
_format: ImageFormat
) -> Result<Self::Image, Error>
pub fn draw_image(
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
[src]
&mut self,
image: &Self::Image,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
pub fn draw_image_area(
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
[src]
&mut self,
image: &Self::Image,
src_rect: impl Into<Rect>,
dst_rect: impl Into<Rect>,
interp: InterpolationMode
)
pub fn blurred_rect(
&mut self,
_rect: Rect,
_blur_radius: f64,
_brush: &impl IntoBrush<Self>
)
[src]
&mut self,
_rect: Rect,
_blur_radius: f64,
_brush: &impl IntoBrush<Self>
)
pub fn with_save(
&mut self,
f: impl FnOnce(&mut Self) -> Result<(), Error>
) -> Result<(), Error>
[src]
&mut self,
f: impl FnOnce(&mut Self) -> Result<(), Error>
) -> Result<(), Error>
Auto Trait Implementations
impl !RefUnwindSafe for RenderContext
[src]
impl !Send for RenderContext
[src]
impl !Sync for RenderContext
[src]
impl Unpin for RenderContext
[src]
impl !UnwindSafe for RenderContext
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
[src]
pub fn round_from(x: T) -> T
[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
[src]
U: RoundFrom<T>,
pub fn round_into(self) -> U
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,