Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/demo_profile.py
diff options
context:
space:
mode:
authorwrobell@pld-linux.org <wrobell@pld-linux.org@a8418922-720d-0410-834f-a69b97ada669>2007-07-12 22:53:45 (GMT)
committer wrobell@pld-linux.org <wrobell@pld-linux.org@a8418922-720d-0410-834f-a69b97ada669>2007-07-12 22:53:45 (GMT)
commit8cab7ef5521004dd3d0dac15d41b8daccc3ef92f (patch)
treee22cdfc6dffe9f6b6de86a4901fffaecbc8e17ac /demo_profile.py
parent949e977c1388432bff57832048a738576aa7243f (diff)
- automatic move example uses matrix now
git-svn-id: http://svn.devjavu.com/gaphor/gaphas/trunk@1627 a8418922-720d-0410-834f-a69b97ada669
Diffstat (limited to 'demo_profile.py')
-rw-r--r--demo_profile.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/demo_profile.py b/demo_profile.py
index 6601e63..f334e75 100644
--- a/demo_profile.py
+++ b/demo_profile.py
@@ -88,9 +88,7 @@ def create_window(canvas, title, zoom=1.0):
import time
t1 = time.time()
for i in range(20):
- for h in handles:
- h.x += 1
- h.y += 1
+ item.matrix.translate(1, 1)
item.request_update()
canvas.update_matrix(item)
# visualize each event:
@@ -176,6 +174,14 @@ def main():
bb.matrix.rotate(math.pi/4.0 * i / 10.0)
c.add(bb, parent=b)
+ for i in range(count):
+ bb = MyBox()
+ bb.width = bb.height = 15
+ x = int(i % 4) * 20
+ y = int(i / 4) * 20
+ bb.matrix.translate(5 + x, 100 + y)
+ c.add(bb)
+
t=MyText('Single line')
t.matrix.translate(70,70)
c.add(t)