Pixel grid for a drawing of drawingWidthMm x drawingHeightMm at dpi,
reduced to fit maxPixels in total and maxDimensionPx per side.
Reduction scales BOTH sides by the same factor, so the aspect ratio (and
therefore the placement rectangle, which is derived from world bounds and
never from pixel counts) is unaffected: a capped raster is blurrier, never
mis-scaled.
Pure arithmetic, cheap enough to call per keystroke. Throws on non-finite
or non-positive inputs rather than returning a plausible-looking grid, on
the same reasoning as computePdfScaleLayout.
Pixel grid for a drawing of
drawingWidthMmxdrawingHeightMmatdpi, reduced to fitmaxPixelsin total andmaxDimensionPxper side.Reduction scales BOTH sides by the same factor, so the aspect ratio (and therefore the placement rectangle, which is derived from world bounds and never from pixel counts) is unaffected: a capped raster is blurrier, never mis-scaled.
Pure arithmetic, cheap enough to call per keystroke. Throws on non-finite or non-positive inputs rather than returning a plausible-looking grid, on the same reasoning as
computePdfScaleLayout.