/[ascend]/trunk/pygtk/canvas/gaphas-test.py
ViewVC logotype

Diff of /trunk/pygtk/canvas/gaphas-test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1787 by jpye, Sun Jun 1 03:41:26 2008 UTC revision 1788 by jpye, Mon Jun 9 11:42:33 2008 UTC
# Line 4  pygtk.require('2.0') Line 4  pygtk.require('2.0')
4  import math  import math
5  import gtk  import gtk
6  import cairo  import cairo
7  from gaphas import Canvas, GtkView, View  from gaphas import GtkView, View
 from gaphas.item import Line, SW, NE, NW, SE, Element, Handle  
8  from gaphas.tool import HoverTool, PlacementTool, HandleTool, ToolChain  from gaphas.tool import HoverTool, PlacementTool, HandleTool, ToolChain
9  from gaphas.tool import ItemTool, RubberbandTool  from gaphas.tool import ItemTool, RubberbandTool
 from gaphas.geometry import point_on_rectangle, distance_rectangle_point  
 from gaphas.constraint import LineConstraint, LessThanConstraint, EqualsConstraint  
 from gaphas.canvas import CanvasProjection  
   
 from gaphas.painter import ItemPainter  
 from gaphas import state  
 from gaphas.util import text_extents  
10    
11  from gaphas import painter  from gaphas import painter
12  #painter.DEBUG_DRAW_BOUNDING_BOX = True  #painter.DEBUG_DRAW_BOUNDING_BOX = True
# Line 105  def create_window(canvas, title, zoom=1. Line 97  def create_window(canvas, title, zoom=1.
97      view.connect('selection-changed', handle_changed, 'selection')      view.connect('selection-changed', handle_changed, 'selection')
98    
99  def main():  def main():
100      c=Canvas()      c=BlockCanvas()
101    
102      create_window(c, 'ASCEND model canvas')      create_window(c, 'ASCEND model canvas')
103    

Legend:
Removed from v.1787  
changed lines
  Added in v.1788

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22