mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-30 05:06:48 -06:00
Images: declare a graphic's clipping path beside its transform
This commit is contained in:
@@ -82,10 +82,10 @@ fn graphic_frame(d: &mut Document, sr: SpreadRef, r: Rect, asset: AssetId, px: (
|
||||
asset,
|
||||
size: (nw, nh),
|
||||
xf: Affine::translate((r.x0 + (r.width() - nw * k) / 2.0, r.y0 + (r.height() - nh * k) / 2.0)) * Affine::scale(k),
|
||||
clip: None,
|
||||
auto_fit: designcraft_doc::Fitting::FillProportionally,
|
||||
fit_align: 4,
|
||||
crop: [0.0; 4],
|
||||
clip: None,
|
||||
});
|
||||
it.object_style = designcraft_doc::BASIC_GRAPHICS_FRAME.into();
|
||||
d.insert_item(sr, it, None)?;
|
||||
|
||||
Reference in New Issue
Block a user