Can I horizontally flip/reflect a shape item in QML. For example; I have the below shape:
Can I flip/reflect it horizontally to produce:
I know I could edit my QML code to draw the lines differently but it would be much simpler to just use a QML animation or something to flip it if thats possible.
Shape {
id: annotationHLine;
anchors.left: annotationShp.right;
anchors.top: annotationShp.top;
anchors.topMargin: annotationShp.height * 0.5;
ShapePath {
strokeWidth: 2;
strokeColor: "Green";
fillColor: "transparent";
startX: -slant; startY: 0;
PathLine { x: relativeTargetX*0.5; y: 0 }
PathLine { x: relativeTargetX; y: relativeTargetY }
}
}
You can use transform
and Scale
:
transform: Scale{ xScale: -1 }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With