Permalink
Browse files

wip lines example

Signed-off-by: Roger Zanoni <roger.zanoni@openbossa.org>
  • Loading branch information...
1 parent ac75cf8 commit 5856b7c3bb8489062584c185dd89d8faaf02f805 @rogerzanoni rogerzanoni committed May 15, 2012
Showing with 71 additions and 1 deletion.
  1. +2 −1 examples/examples.pro
  2. +63 −0 examples/lines/GameWindow.qml
  3. +1 −0 examples/lines/lines.pro
  4. +5 −0 examples/lines/resources.qrc
View
@@ -18,4 +18,5 @@ SUBDIRS += animated_layer \
triangle \
polygon \
circle \
- ellipse
+ ellipse \
+ lines
@@ -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
+ }
+ }
+}
View
@@ -0,0 +1 @@
+include(../examples.pri)
@@ -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.