Skip to main content

stroke_adjust

Function stroke_adjust 

Source
pub fn stroke_adjust(adj: &XPathAdjust, x: &mut f64, y: &mut f64)
Expand description

Apply a stroke-adjust hint to a single point (x, y).

If adj.vert is true, the x-coordinate is examined; otherwise the y-coordinate. If the relevant coordinate falls strictly inside any of the three snap windows (open intervals), it is replaced by the corresponding snapped target.

§Open-interval semantics

Windows are open intervals; boundary values are not snapped. For example, a coordinate equal to exactly adj.x0a (= adj0 - 0.01) is outside the window (x0a, x0b) and will not be snapped.

Matches SplashXPath::strokeAdjust() in SplashXPath.cc.