summaryrefslogtreecommitdiff
path: root/src/export
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-27 00:49:02 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-27 01:00:57 +0100
commit7caf98fe42797eab59a39ef71071030c9790245a (patch)
treecadf45a53aad29f11bf30a164f646b5a73bb5f16 /src/export
parent6bafc6391061d4b589dea835705a08b25a4df9f8 (diff)
Switch `StrResult` to `EcoString`
Diffstat (limited to 'src/export')
-rw-r--r--src/export/pdf/mod.rs4
-rw-r--r--src/export/render.rs7
2 files changed, 2 insertions, 9 deletions
diff --git a/src/export/pdf/mod.rs b/src/export/pdf/mod.rs
index 7a530f04..7e5a3c06 100644
--- a/src/export/pdf/mod.rs
+++ b/src/export/pdf/mod.rs
@@ -21,10 +21,6 @@ use crate::image::Image;
/// Export a document into a PDF file.
///
-/// This creates one page per frame. In addition to the frames, you need to pass
-/// in the context used during compilation so that fonts and images can be
-/// included in the PDF.
-///
/// Returns the raw bytes making up the PDF file.
pub fn pdf(document: &Document) -> Vec<u8> {
let mut ctx = PdfContext::new(&document.metadata);
diff --git a/src/export/render.rs b/src/export/render.rs
index 14654b9b..a61ff1be 100644
--- a/src/export/render.rs
+++ b/src/export/render.rs
@@ -16,11 +16,8 @@ use crate::image::{DecodedImage, Image};
/// Export a frame into a raster image.
///
-/// This renders the frame at the given number of pixels per printer's point and
-/// returns the resulting `tiny-skia` pixel buffer.
-///
-/// In addition to the frame, you need to pass in the context used during
-/// compilation so that fonts and images can be rendered.
+/// This renders the frame at the given number of pixels per point and returns
+/// the resulting `tiny-skia` pixel buffer.
pub fn render(frame: &Frame, pixel_per_pt: f32) -> sk::Pixmap {
let size = frame.size();
let pxw = (pixel_per_pt * size.x.to_f32()).round().max(1.0) as u32;