Skip to main content

write_matrix

Function write_matrix 

Source
pub fn write_matrix(out: &mut String, m: Affine)
Expand description

Append a matrix as a b c d e f — single spaces, no brackets, no trailing space. This is the operand list of cm and Tm.

use pdfrum_common::kurbo::Affine;

let mut out = String::new();
pdfrum_edit::write_matrix(&mut out, Affine::new([1.0, 0.0, 0.0, 1.0, 10.5, 20.25]));
assert_eq!(out, "1 0 0 1 10.5 20.25");