mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 05:44:52 +00:00
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:
parent
79ba943882
commit
992f990fa8
12 changed files with 162 additions and 36 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue