Scalable graphics with Shape
Unsolved
General and Desktop
-
Hi all,
How would I efficiently draw a path in a Shape with coordinates relative to the size of the Shape? Of course I could do something like:
Shape { id: wrap anchors.fill: parent ShapePath { strokeColor: "red" strokeWidth: 10 startX: .2 * wrap.width; startY: .3 * wrap.height PathLine { x: .3 * wrap.width; y: .5 * wrap.height} PathLine { x: .1 * wrap.width; y: .4 * wrap.height} PathLine { x: .2 * wrap.width; y: .1 * wrap.height} } }
but this feels like a cumbersome API with a lot of redundant bindings (one should be enough, right?)