fix(layout): complete paperspace integration

Apply each layout's embedded page setup and plot style consistently across display, PDF, printing, and multi-layout output.\n\nRefs #844
This commit is contained in:
Hakan Seven committed 2026-08-26 08:58:44 +03:00
1 parent 9c8f841f71
commit 8c61d89b1e
18 files changed
+1393 -373

No files matched your search

+33
View File
@@ -139,6 +139,39 @@ impl GradientKind {
}
}
pub(crate) fn plot_style_fill_pattern(style: u8) -> Option<HatchPattern> {
let family = |angle_deg, dx, dy, dashes: &[f32]| PatFamily {
angle_deg,
x0: 0.0,
y0: 0.0,
dx,
dy,
dashes: dashes.to_vec(),
};
let pattern = match style {
64 => HatchPattern::Solid,
65 => HatchPattern::Pattern(vec![
family(0.0, 0.0, 2.0, &[2.0, -2.0]),
family(90.0, 2.0, 0.0, &[2.0, -2.0]),
]),
66 => HatchPattern::Pattern(vec![
family(0.0, 0.0, 2.0, &[]),
family(90.0, 2.0, 0.0, &[]),
]),
67 => HatchPattern::Pattern(vec![
family(45.0, 0.0, 2.0, &[]),
family(135.0, 0.0, 2.0, &[]),
]),
68 => HatchPattern::Pattern(vec![family(0.0, 0.0, 2.0, &[])]),
69 => HatchPattern::Pattern(vec![family(135.0, 0.0, 2.0, &[])]),
70 => HatchPattern::Pattern(vec![family(45.0, 0.0, 2.0, &[])]),
71 => HatchPattern::Pattern(vec![family(0.0, 0.0, 2.0, &[0.0, -2.0])]),
72 => HatchPattern::Pattern(vec![family(90.0, 2.0, 0.0, &[])]),
_ => return None,
};
Some(pattern)
}
/// Hatch fill pattern.
#[derive(Clone, Debug)]
pub enum HatchPattern {