1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-13 20:48:42 +01:00
LibrePilot/ground/gcs/src/share/pfd/default/SvgElementPositionItem.qml
James Duley c14cacb043 LP-1 rebranding: move ground/{openpilotgcs => gcs}
and associated pro file.

Change-Id: Icc200217f2db27635c7aa2e5b182f9b273925647
2015-08-02 19:20:02 +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)
}