strokePen
The pen for a stroke lineWidth user units wide under ctm.
A matrix that keeps circles round strokes in device space, with the width and the dashes scaled by the matrix.
Any other invertible matrix strokes the path in user space under the matrix, so the stroker of the canvas draws the elliptical pen. MuPDF strokes the same way.
A singular matrix strokes in device space, scaled by the mean length of its columns.
Every canvas shares one floor, so a page has the same weight on every backend (#109, #110):
A line width of 0 is hairlinePx device pixels wide. ISO 32000-1, 8.4.3.2 makes it the thinnest line the device can render, one device pixel.
Any other pen thinner than a fifth of hairlinePx widens to that fifth. The spec sets no floor here. A fifth of a pixel is the anti-alias unit that MuPDF widens every stroke to (
fz_draw_stroke_path_auxin draw-device.c), so a rule of 0.15 units at 72 dpi stays a light line and does not become a solid pixel. MuPDF also draws a width of 0 at this fifth.
A canvas that draws a raster larger than its final size passes the ratio of the two as hairlinePx, so both widths hold at the final size. An elliptical pen is measured as MuPDF measures it, by the square root of the determinant of ctm.