pub struct PdfRenderer { /* private fields */ }Expand description
A renderer that produces PDF output.
Uses printpdf’s PdfDocument / PdfPage / PdfLayer model.
All plotkit coordinates (origin top-left, y-down) are converted to PDF
coordinates (origin bottom-left, y-up) during rendering.
Implementations§
Trait Implementations§
Source§impl Renderer for PdfRenderer
impl Renderer for PdfRenderer
Source§fn fill_path(&mut self, path: &Path, paint: &Paint, transform: Affine)
fn fill_path(&mut self, path: &Path, paint: &Paint, transform: Affine)
Fills a path with the given paint, under the given transform.
Source§fn stroke_path(
&mut self,
path: &Path,
paint: &Paint,
stroke: &Stroke,
transform: Affine,
)
fn stroke_path( &mut self, path: &Path, paint: &Paint, stroke: &Stroke, transform: Affine, )
Strokes a path with the given paint and stroke style, under the given transform.
Source§fn draw_text(
&mut self,
text: &str,
pos: Point,
style: &TextStyle,
transform: Affine,
)
fn draw_text( &mut self, text: &str, pos: Point, style: &TextStyle, transform: Affine, )
Draws text at the given position with the given style, under the given transform.
Source§fn draw_image(&mut self, _img: &Image, _dst: Rect, _transform: Affine)
fn draw_image(&mut self, _img: &Image, _dst: Rect, _transform: Affine)
Draws a raster image into the destination rectangle, under the given transform.
Source§fn push_clip(&mut self, path: &Path, transform: Affine)
fn push_clip(&mut self, path: &Path, transform: Affine)
Pushes a clipping path. All subsequent draws are clipped to this path.
Auto Trait Implementations§
impl !RefUnwindSafe for PdfRenderer
impl !Send for PdfRenderer
impl !Sync for PdfRenderer
impl !UnwindSafe for PdfRenderer
impl Freeze for PdfRenderer
impl Unpin for PdfRenderer
impl UnsafeUnpin for PdfRenderer
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