mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-29 20:27:05 -06:00
PNG, PNG-8, JPEG, WebP, GIF, TIFF, BMP, Targa and PSD exports take `width` or `height` in pixels. Each file is scaled so that its own artboard, `rect` or art bounds is that wide or high, so with `useArtboards` every file gets its own scale. `width` wins over `height`, and either wins over `ppi` and `scale`, in the order an Export for Screens row reads its size. The scale stays within 0.01 to 64 pixels per point and the file stores the resolution that results. A value that is not a positive number is refused. The per-file scale comes from `ScreenSize::scale_for`, which Export for Screens rows already use. Rows keep their own size: their format settings still drop `width` and `height`. `document.formats` lists the two options for every raster format.