Skip to content

Instantly share code, notes, and snippets.

@tuduweb
Created August 8, 2021 13:28
Show Gist options
  • Save tuduweb/d18d5da4f41910a1bd58d16a6b1da864 to your computer and use it in GitHub Desktop.
Save tuduweb/d18d5da4f41910a1bd58d16a6b1da864 to your computer and use it in GitHub Desktop.
qml painter
Image
{
id: bgImg
visible: useImageAsBackground
z: 6
source: backgroundImagePath
height: backgroundImageRotate ? bg.width : bg.height
width: backgroundImageRotate ? bg.height : bg.width
sourceSize.height: height
sourceSize.width: width
anchors.centerIn: bg
clip: true
smooth: true
rotation: backgroundImageRotate ? 90 : 0
fillMode: Image.PreserveAspectFit
}
Repeater
{
id: layersRep
model: layers
delegate: Canvas {
visible: (typeof show != 'undefined') ? (show && (activeLayer != index)) : false
Component.onCompleted:
{
width = window.width
height = window.height
requestPaint()
}
z: layers.count - index
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment