mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-28 10:44:42 +00:00
23 lines
619 B
QML
23 lines
619 B
QML
|
import QtQuick 2.9
|
||
|
|
||
|
Rectangle {
|
||
|
id: graphicItem
|
||
|
property var model: null
|
||
|
property real angle: (model) ? model.angle : 0;
|
||
|
property string texture: (model) ? model.texture : "";
|
||
|
property rect rec: (model) ? model.rect : Qt.rect(0, 0, 0, 0);
|
||
|
property int guiId: (model) ? model.color : -1;
|
||
|
|
||
|
color: (model) ? model.color : "#11ff32";
|
||
|
width: rec.width * mainWindow.point;
|
||
|
height: rec.height * mainWindow.point;
|
||
|
x: rec.x * mainWindow.point;
|
||
|
y: rec.y * mainWindow.point;
|
||
|
|
||
|
transform: Rotation {
|
||
|
origin.x: 0;
|
||
|
origin.y: 0;
|
||
|
angle: graphicItem.angle;
|
||
|
}
|
||
|
}
|