Open madig opened 3 years ago
mm. I was also today running into decomposition, so I do think it makes sense to have a to_kurbo
method on Contour
, behind the kurbo
feature. Does it make more sense to use the norad affine type in your case? I'm not sure, just thinking aloud...
Then all the affine transformations would need to be impl'd on norad's affine type, no? I thought we should reuse kurbo for that.
Can we also have a to_kurbo
method (or even better some kind of Into trait) on AffineTransform
for components? Currently I'm doing this:
let transform = [
component.transform.x_scale as f64,
component.transform.xy_scale as f64,
component.transform.y_scale as f64,
component.transform.yx_scale as f64,
component.transform.x_offset as f64,
component.transform.y_offset as f64,
];
Affine::new(transform)
@simoncozens we've got this already: https://github.com/linebender/norad/blob/master/src/glyph/mod.rs#L556
Hah, great. Not sure why I couldn’t see it on docs.rs - maybe it doesn’t pick up stuff behind features.
Yes, I think that's true.
I'd like to be able to do
kurbo::Affine * Contour
or some such, found at least two instances where that would come in handy. Maybe something for returning a transformed copy and for transforming in place?