Skip to content

Commit

Permalink
wip lines example
Browse files Browse the repository at this point in the history
Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
  • Loading branch information
Roger Zanoni committed May 15, 2012
1 parent ac75cf8 commit 5856b7c
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/examples.pro
Expand Up @@ -18,4 +18,5 @@ SUBDIRS += animated_layer \
triangle \ triangle \
polygon \ polygon \
circle \ circle \
ellipse ellipse \
lines
63 changes: 63 additions & 0 deletions examples/lines/GameWindow.qml
@@ -0,0 +1,63 @@
/**
* Copyright (C) 2012 by INdT
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* @author Rodrigo Goncalves de Oliveira <rodrigo.goncalves@openbossa.org>
* @author Roger Felipe Zanoni da Silva <roger.zanoni@openbossa.org>
*/

QuasiGame {
id: game

width: 400
height: 250

currentScene: scene

QuasiScene {
id: scene

width: parent.width
height: parent.height

entities: [
QuasiEntity {
id: rect
width: 300
height: 300

QuasiLines {
width: 200
height: 200

points: [[0, 190], [190, 190], [190, 190], [160, 10], [160, 10], [50, 60]]

fill: QuasiColorFill {

penColor: "blue"
penWidth: 5
}
}
}
]

MouseArea {
anchors.fill: rect

drag.target: rect
}
}
}
1 change: 1 addition & 0 deletions examples/lines/lines.pro
@@ -0,0 +1 @@
include(../examples.pri)
5 changes: 5 additions & 0 deletions examples/lines/resources.qrc
@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>GameWindow.qml</file>
</qresource>
</RCC>

0 comments on commit 5856b7c

Please sign in to comment.