summaryrefslogtreecommitdiff
path: root/host/simu/inter/drawable.py
diff options
context:
space:
mode:
authorNicolas Schodet2009-04-30 09:53:44 +0200
committerNicolas Schodet2009-04-30 09:53:44 +0200
commit69305ae1ed6da084b6ee65dba3ce44f0d6cbe2d1 (patch)
treebb898529fc7e986429094dd9b5d28ce4397dbba7 /host/simu/inter/drawable.py
parentfb3cfa5a0ac1acb58c2067cd1aad0339b534f982 (diff)
* host/simu, digital/io/tools:
- new simulation infrastructure.
Diffstat (limited to 'host/simu/inter/drawable.py')
-rw-r--r--host/simu/inter/drawable.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/simu/inter/drawable.py b/host/simu/inter/drawable.py
index d11ad9d6..bcf1823f 100644
--- a/host/simu/inter/drawable.py
+++ b/host/simu/inter/drawable.py
@@ -140,6 +140,16 @@ class DrawableCanvas(Tkinter.Canvas):
self.__updated = [ ]
self._Drawable__children = [ ]
+ def resize (self, width, height, xorigin = None, yorigin = None):
+ """Change size given at initialisation. Will be used on next
+ configure event."""
+ self.__width = width
+ self.__height = height
+ if xorigin is not None:
+ self.__xorigin = xorigin
+ if yorigin is not None:
+ self.__yorigin = yorigin
+
def __resize (self, ev):
# Compute new scale.
w, h = float (ev.width), float (ev.height)