Fix #995: a width-profile stroke keeps its shape when the view zooms out

The canvas keeps a hairline visible by raising a stroke's weight to half a device pixel. A width profile multiplies that weight, so a 1 pt stroke with a 6x width point swelled to twice its size at 25% zoom and shrank back on zooming in. The minimum now goes to the profile's widest point instead; plain strokes are unchanged.
This commit is contained in:
Taha-Mahmoodi
2026-10-31 19:43:16 +07:00
committed by bflatastic
parent 59eb658fd7
commit f65d28378f
5 changed files with 81 additions and 3 deletions
+1
View File
@@ -29,6 +29,7 @@ mod setup;
mod strokegradient;
mod tileedge;
mod viewraster;
mod widthzoom;
fn rect_node(d: &mut Document, r: Rect, fill: Paint, stroke: Paint, w: f64) -> Node {
let id = d.alloc_id();