Skip to main content

transform

Function transform 

Source
pub const fn transform(m: &[f64; 6], xi: f64, yi: f64) -> PathPoint
Expand description

Apply a 2-D affine matrix to point (xi, yi), returning the transformed PathPoint in device space.

Column-vector convention matching SplashXPath::transform:

x_out = xi*m[0] + yi*m[2] + m[4]
y_out = xi*m[1] + yi*m[3] + m[5]

Uses f64::mul_add for fused multiply-add, giving one rounding error per term rather than two.