Solved Specific rotate of rectangle
-
Hi. How can I rotate a rectangle to get isosceles trapezoid?
-
You mean rotating your rectangle around an axis until you get a trapezoid?
Where do you want to do it? What are you using? QGraphicsView? QOpenGL?Edit:
Nevermind, didnt notice the "QML"-category :)
@IntruderExcluder `s approach looks good. -
You can at least play with
transform
property andRotation
:Rectangle { id: r1 width: 100 height: 200 color: "blue" opacity: 0.5 anchors.centerIn: parent transform: Rotation { id: rotation origin { x: r1.width/2 y: r1.height } axis { x: 1 y: 0 z: 0 } angle: 45 } }
-
@pl45m4 Yep, rotating the rectangle around an axis until I get a trapezoid. I want do it in .qml just using QtQuick and Rotation QML Type.
-
@pl45m4 said in Specific rotate of rectangle:
Nevermind, didnt notice the "QML"-category :)
@IntruderExcluder `s approach looks good. -
@intruderexcluder
this is what I need. Thank you!