Comment 3 for bug 1542093

Revision history for this message
LucaDC (lucadc) wrote :

It seems you're right: actually 'px' is the only unit working correctly. All other units seem broken because they apply the (incorrect) transformation between the default 96 DPI 'px' and the selected unit, then apply it in the current document unit.

Tested with rev14630 on Windows XP:
 - mm as default unit;
 - A4 page 297x210 mm;
 - scale 1,0 in both x and y (viewbox 0 0 210 297);
 - drawn a rectangle of 100 x 100 mm using guides (no transformations) (*1), miter join, butt cap (*2);
 - set outset 1 cm: got a 175,59 x 175,59 mm rectangle (+10/25.4*96 mm on each side);
 - set outset 1 px: got a 102 x 102 mm rectangle (+1 mm on each side).

(*1) If a 1 x 1 mm rectangle is drawn, then stretched to 100 x 100 mm with preserved transformations (100x transformation), then a 1 cm outset makes it become a 2100 x 2100 mm rectangle. In this case the unit seems to have been correctly considered but the transformation matrix is not compensated for: +10*100 mm on each side.

(*2) The outset takes into consideration the border path join and cap types. If round join and round cap are used, the result is a rounded rectangle 175,872 x 175,888 mm (like if 25,3 mm/inch was used). This setting is remembered even if the border is removed.