Changeset 1792
- Timestamp:
- 07/30/07 06:28:36 (1 year ago)
- Files:
-
- gaphas/trunk/gaphas/item.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphas/trunk/gaphas/item.py
r1782 r1792 117 117 118 118 Attributes: 119 - _canvas: canvas, which owns an item 120 - _handles: list of handles owned by an item 121 - _constraints: item's constraints 122 - matrix: item's transformation matrix 123 - _matrix_i2c: item to canvas coordinates matrix 124 - _matrix_c2i: canvas to item coordinates matrix 125 - _matrix_i2v: item to view coordinates matrices 126 - _matrix_v2i: view to item coordinates matrices 127 - _sort_key: used to sort items 119 120 - _canvas: canvas, which owns an item 121 - _handles: list of handles owned by an item 122 - _constraints: item's constraints 123 - matrix: item's transformation matrix 124 - _matrix_i2c: item to canvas coordinates matrix 125 - _matrix_c2i: canvas to item coordinates matrix 126 - _matrix_i2v: item to view coordinates matrices 127 - _matrix_v2i: view to item coordinates matrices 128 - _sort_key: used to sort items 128 129 """ 129 130 … … 207 208 """ 208 209 Perform any changes before item update here, for example: 209 -change matrix210 -move handles210 * change matrix 211 * move handles 211 212 212 213 Gaphas does not guarantee that any canvas invariant is valid at … … 236 237 Context contains the following attributes: 237 238 238 - matrix_i2w: Item to World transformation matrix (no need to)239 239 - cairo: the Cairo Context use this one to draw 240 240 - view: the view that is to be rendered to 241 - selected, focused, hovered, dropzone: view state of items 241 - selected, focused, hovered, dropzone: view state of items (True/False) 242 - draw_all: a request to draw everything, for bounding box calculations 242 243 """ 243 244 pass … … 251 252 def point(self, x, y): 252 253 """ 253 Get the distance from a point ( @x, @y) to the item.254 @x and @yare in item coordinates.254 Get the distance from a point (``x``, ``y``) to the item. 255 ``x`` and ``y`` are in item coordinates. 255 256 """ 256 257 pass … … 507 508 def split_segment(self, segment, parts=2): 508 509 """ 509 Split one segment in the Line in @partsequal pieces.510 @segment0 is the first segment (between handles 0 and 1).510 Split one segment in the Line in ``parts`` equal pieces. 511 ``segment`` 0 is the first segment (between handles 0 and 1). 511 512 The min number of parts is 2. 512 513 … … 547 548 def merge_segment(self, segment, parts=2): 548 549 """ 549 Merge the @segmentand the next.550 Merge the ``segment`` and the next. 550 551 The parts parameter indicates how many segments should be merged 551 552
