mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
PDF import: one helper for the dictionary values the reader can parse
This commit is contained in:
@@ -10,7 +10,7 @@ use craft_pdf::syntax::{DecryptionError, LoadPdfError, Pdf};
|
||||
use kurbo::{Affine, Rect};
|
||||
use vectorcraft_doc::setup::MAX_BLEED;
|
||||
|
||||
use crate::import_color::direct;
|
||||
use crate::import_color::{direct, values};
|
||||
use crate::{Choice, CropTo, ImportOptions, PdfError};
|
||||
|
||||
/// What `info` tells about one page.
|
||||
@@ -46,11 +46,6 @@ const MAX_LINKS: usize = 16;
|
||||
/// The application's calculator-procedure depth policy, layered over the shared reader's limits.
|
||||
const MAX_PROCEDURES: usize = 64;
|
||||
|
||||
/// The values of `d` that the reader can parse (`Dict::entries` panics on one it can't).
|
||||
fn values<'a>(d: &Dict<'a>) -> impl Iterator<Item = MaybeRef<Object<'a>>> {
|
||||
d.keys().filter_map(|k| d.get_raw::<Object<'a>>(k.as_ref()))
|
||||
}
|
||||
|
||||
/// What the function or colour space `o` is built on: the functions a stitching function joins;
|
||||
/// the base, alternate and tint of a colour space; the alternate of a colour profile. Nothing for
|
||||
/// any other object.
|
||||
|
||||
Reference in New Issue
Block a user