Allow for fitting paths into a given bounding rectangle

... by applying a transformation. This allows designing a path in some
other path design tool and then make it fit using bindings.
This commit is contained in:
Simon Hausmann 2020-07-13 15:38:56 +02:00
parent 79ba943882
commit 992f990fa8
12 changed files with 162 additions and 36 deletions

View file

@ -74,6 +74,8 @@ fn main() {
let path_primitive = rendering_primitives_builder.create(RenderingPrimitive::Path {
x: 50.,
y: 300.,
width: 0.,
height: 0.,
elements: PathData::Elements(SharedArray::from(TRIANGLE_PATH)),
fill_color: Color::from_rgb(0, 128, 255),
stroke_color: Color::BLACK,