1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-05 22:29:15 +01:00
2013-11-14 00:48:00 +01:00

15 lines
475 B
QML

import QtQuick 2.0
Item {
id: sceneItem
property variant sceneSize
property string elementName
property string svgFileName: "pfd.svg"
property variant scaledBounds: svgRenderer.scaledElementBounds(svgFileName, elementName)
x: Math.floor(scaledBounds.x * sceneSize.width)
y: Math.floor(scaledBounds.y * sceneSize.height)
width: Math.floor(scaledBounds.width * sceneSize.width)
height: Math.floor(scaledBounds.height * sceneSize.height)
}