Skip to main content

write_rect

Function write_rect 

Source
pub fn write_rect(out: &mut String, r: Rect)
Expand description

Append a rectangle as left bottom width heightnot the x0 y0 x1 y1 an array-valued /MediaBox uses. This is the operand list of re, so the last two numbers are extents and may be negative.

use pdfrum_common::kurbo::Rect;

let mut out = String::new();
pdfrum_edit::write_rect(&mut out, Rect::new(1.0, 2.0, 10.0, 20.0));
assert_eq!(out, "1 2 9 18");