Paint colorbox backgrounds

This commit is contained in:
gloamxun committed 2026-10-26 03:05:07 +08:00
1 parent eebe6deac5
commit d88e74cd29
8 files changed
+167 -25

No files matched your search

+18
View File
@@ -573,6 +573,24 @@ fn page_content(
));
}
DisplayItem::Background(_) => {}
DisplayItem::Rect {
x,
y,
width,
height,
color,
} => {
content.push_str(&format!(
"{:.3} {:.3} {:.3} rg\n{} {} {} {} re f\n",
color[0] as f64 / 255.0,
color[1] as f64 / 255.0,
color[2] as f64 / 255.0,
pt(*x),
pt(height - *y - *height),
pt(*width),
pt(*height)
));
}
DisplayItem::Rule {
x,
y,