mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-01 22:26:49 -06:00
Images: declare a graphic's clipping path beside its transform
This commit is contained in:
@@ -264,10 +264,10 @@ fn flatten(d: &designcraft_doc::Document, cache: &designcraft_compose::Cache, pp
|
||||
size: (w as f64, h as f64),
|
||||
xf: designcraft_geom::Affine::translate((r.x0, r.y0))
|
||||
* designcraft_geom::Affine::scale_non_uniform(r.width() / w as f64, r.height() / h as f64),
|
||||
clip: None,
|
||||
auto_fit: Default::default(),
|
||||
fit_align: 4,
|
||||
crop: [0.0; 4],
|
||||
clip: None,
|
||||
});
|
||||
it.stroke.weight = 0.0;
|
||||
it
|
||||
@@ -430,10 +430,10 @@ fn rasterize_where(
|
||||
asset: aid,
|
||||
size: (w as f64, h as f64),
|
||||
xf: designcraft_geom::Affine::translate((reach.x0, reach.y0)) * designcraft_geom::Affine::scale(1.0 / k),
|
||||
clip: None,
|
||||
auto_fit: Default::default(),
|
||||
fit_align: 4,
|
||||
crop: [0.0; 4],
|
||||
clip: None,
|
||||
});
|
||||
img_item.stroke.weight = 0.0;
|
||||
img_item.alt_text = it.alt_text.clone();
|
||||
|
||||
Reference in New Issue
Block a user