mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-13 20:48:42 +01:00
c14cacb043
and associated pro file. Change-Id: Icc200217f2db27635c7aa2e5b182f9b273925647
15 lines
475 B
QML
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)
|
|
}
|