author | andy |
Thu, 09 Jun 2005 22:07:02 +0000 | |
changeset 2500 | ea0e8cec358c |
parent 2379 | 6226a940d978 |
child 2525 | 634ec1f48514 |
permissions | -rw-r--r-- |
2332 | 1 |
#Copyright ReportLab Europe Ltd. 2000-2004 |
494 | 2 |
#see license.txt for license details |
2332 | 3 |
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/frames.py |
565 | 4 |
|
2332 | 5 |
__version__=''' $Id$ ''' |
565 | 6 |
|
253 | 7 |
__doc__=""" |
8 |
""" |
|
565 | 9 |
|
2500 | 10 |
import logging |
11 |
logger = logging.getLogger('reportlab.platypus') |
|
12 |
||
565 | 13 |
_geomAttr=('x1', 'y1', 'width', 'height', 'leftPadding', 'bottomPadding', 'rightPadding', 'topPadding') |
1231
05dc2104f72d
disable LayoutError error for production use (option to enable for debug)
aaron_watters
parents:
1035
diff
changeset
|
14 |
from reportlab import rl_config |
2379 | 15 |
_FUZZ=rl_config._FUZZ |
1231
05dc2104f72d
disable LayoutError error for production use (option to enable for debug)
aaron_watters
parents:
1035
diff
changeset
|
16 |
|
253 | 17 |
class Frame: |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
18 |
''' |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
19 |
A Frame is a piece of space in a document that is filled by the |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
20 |
"flowables" in the story. For example in a book like document most |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
21 |
pages have the text paragraphs in one or two frames. For generality |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
22 |
a page might have several frames (for example for 3 column text or |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
23 |
for text that wraps around a graphic). |
1683 | 24 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
25 |
After creation a Frame is not usually manipulated directly by the |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
26 |
applications program -- it is used internally by the platypus modules. |
1683 | 27 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
28 |
Here is a diagramatid abstraction for the definitional part of a Frame |
253 | 29 |
|
30 |
width x2,y2 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
31 |
+---------------------------------+ |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
32 |
| l top padding r | h |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
33 |
| e +-------------------------+ i | e |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
34 |
| f | | g | i |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
35 |
| t | | h | g |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
36 |
| | | t | h |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
37 |
| p | | | t |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
38 |
| a | | p | |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
39 |
| d | | a | |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
40 |
| | | d | |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
41 |
| +-------------------------+ | |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
42 |
| bottom padding | |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
43 |
+---------------------------------+ |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
44 |
(x1,y1) <-- lower left corner |
1683 | 45 |
|
268 | 46 |
NOTE!! Frames are stateful objects. No single frame should be used in |
47 |
two documents at the same time (especially in the presence of multithreading. |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
48 |
''' |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
49 |
def __init__(self, x1, y1, width,height, leftPadding=6, bottomPadding=6, |
2213 | 50 |
rightPadding=6, topPadding=6, id=None, showBoundary=0, |
51 |
overlapAttachedSpace=None): |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
52 |
self.id = id |
253 | 53 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
54 |
#these say where it goes on the page |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
55 |
self.__dict__['_x1'] = x1 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
56 |
self.__dict__['_y1'] = y1 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
57 |
self.__dict__['_width'] = width |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
58 |
self.__dict__['_height'] = height |
253 | 59 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
60 |
#these create some padding. |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
61 |
self.__dict__['_leftPadding'] = leftPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
62 |
self.__dict__['_bottomPadding'] = bottomPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
63 |
self.__dict__['_rightPadding'] = rightPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
64 |
self.__dict__['_topPadding'] = topPadding |
253 | 65 |
|
1923 | 66 |
# these two should NOT be set on a frame. |
67 |
# they are used when Indenter flowables want |
|
68 |
# to adjust edges e.g. to do nested lists |
|
69 |
self._leftExtraIndent = 0.0 |
|
70 |
self._rightExtraIndent = 0.0 |
|
2200
be0cfccc662a
Fixed up tabs and whitespace in all source files
andy_robinson
parents:
2013
diff
changeset
|
71 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
72 |
# if we want a boundary to be shown |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
73 |
self.showBoundary = showBoundary |
253 | 74 |
|
2213 | 75 |
if overlapAttachedSpace is None: overlapAttachedSpace = rl_config.overlapAttachedSpace |
76 |
self._oASpace = overlapAttachedSpace |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
77 |
self._geom() |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
78 |
self._reset() |
253 | 79 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
80 |
def __getattr__(self,a): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
81 |
if a in _geomAttr: return self.__dict__['_'+a] |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
82 |
raise AttributeError, a |
410 | 83 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
84 |
def __setattr__(self,a,v): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
85 |
if a in _geomAttr: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
86 |
self.__dict__['_'+a] = v |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
87 |
self._geom() |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
88 |
else: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
89 |
self.__dict__[a] = v |
410 | 90 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
91 |
def _geom(self): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
92 |
self._x2 = self._x1 + self._width |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
93 |
self._y2 = self._y1 + self._height |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
94 |
#efficiency |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
95 |
self._y1p = self._y1 + self._bottomPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
96 |
#work out the available space |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
97 |
self._aW = self._x2 - self._x1 - self._leftPadding - self._rightPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
98 |
self._aH = self._y2 - self._y1p - self._topPadding |
410 | 99 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
100 |
def _reset(self): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
101 |
#drawing starts at top left |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
102 |
self._x = self._x1 + self._leftPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
103 |
self._y = self._y2 - self._topPadding |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
104 |
self._atTop = 1 |
2213 | 105 |
self._prevASpace = 0 |
253 | 106 |
|
1923 | 107 |
def _getAvailableWidth(self): |
108 |
return self._aW - self._leftExtraIndent - self._rightExtraIndent |
|
2200
be0cfccc662a
Fixed up tabs and whitespace in all source files
andy_robinson
parents:
2013
diff
changeset
|
109 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
110 |
def _add(self, flowable, canv, trySplit=0): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
111 |
""" Draws the flowable at the current position. |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
112 |
Returns 1 if successful, 0 if it would not fit. |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
113 |
Raises a LayoutError if the object is too wide, |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
114 |
or if it is too high for a totally empty frame, |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
115 |
to avoid infinite loops""" |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
116 |
y = self._y |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
117 |
p = self._y1p |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
118 |
s = 0 |
2375 | 119 |
aW = self._getAvailableWidth() |
2213 | 120 |
if not self._atTop: |
121 |
s =flowable.getSpaceBefore() |
|
122 |
if self._oASpace: |
|
2375 | 123 |
s = max(s-self._prevASpace,0) |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
124 |
h = y - p - s |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
125 |
if h>0: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
126 |
flowable.canv = canv #so they can use stringWidth etc |
2375 | 127 |
w, h = flowable.wrap(aW, h) |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
128 |
del flowable.canv |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
129 |
else: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
130 |
return 0 |
253 | 131 |
|
2375 | 132 |
h += s |
133 |
y -= h |
|
253 | 134 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
135 |
if y < p-_FUZZ: |
2375 | 136 |
if not rl_config.allowTableBoundsErrors and ((h>self._aH or w>aW) and not trySplit): |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
137 |
raise "LayoutError", "Flowable %s (%sx%s points) too large for frame (%sx%s points)." % ( |
2375 | 138 |
flowable.__class__, w,h, aW,self._aH) |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
139 |
return 0 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
140 |
else: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
141 |
#now we can draw it, and update the current point. |
2375 | 142 |
flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w) |
2500 | 143 |
logger.debug('drew %s: \n %s' % (flowable.__class__.__name__, flowable.identity())) |
2213 | 144 |
s = flowable.getSpaceAfter() |
2375 | 145 |
y -= s |
2213 | 146 |
if self._oASpace: self._prevASpace = s |
2375 | 147 |
if y!=self._y: self._atTop = 0 |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
148 |
self._y = y |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
149 |
return 1 |
253 | 150 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
151 |
add = _add |
253 | 152 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
153 |
def split(self,flowable,canv): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
154 |
'''Ask the flowable to split using up the available space.''' |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
155 |
y = self._y |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
156 |
p = self._y1p |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
157 |
s = 0 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
158 |
if not self._atTop: s = flowable.getSpaceBefore() |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
159 |
flowable.canv = canv #some flowables might need this |
2200
be0cfccc662a
Fixed up tabs and whitespace in all source files
andy_robinson
parents:
2013
diff
changeset
|
160 |
|
1838
f7eeee67832c
Changes to allow invariant documents when needed
andy_robinson
parents:
1683
diff
changeset
|
161 |
#print 'asked table to split. _aW = %0.2f, y-p-s=%0.2f' % (self._aW, y-p-s) |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
162 |
r = flowable.split(self._aW, y-p-s) |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
163 |
del flowable.canv |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
164 |
return r |
253 | 165 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
166 |
def drawBoundary(self,canv): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
167 |
"draw the frame boundary as a rectangle (primarily for debugging)." |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
168 |
from reportlab.lib.colors import Color, CMYKColor, toColor |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
169 |
sb = self.showBoundary |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
170 |
isColor = type(sb) in (type(''),type(()),type([])) or isinstance(sb,Color) |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
171 |
if isColor: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
172 |
sb = toColor(sb,self) |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
173 |
if sb is self: isColor = 0 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
174 |
else: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
175 |
canv.saveState() |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
176 |
canv.setStrokeColor(sb) |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
177 |
canv.rect( |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
178 |
self._x1, |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
179 |
self._y1, |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
180 |
self._x2 - self._x1, |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
181 |
self._y2 - self._y1 |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
182 |
) |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
183 |
if isColor: canv.restoreState() |
1683 | 184 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
185 |
def addFromList(self, drawlist, canv): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
186 |
"""Consumes objects from the front of the list until the |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
187 |
frame is full. If it cannot fit one object, raises |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
188 |
an exception.""" |
253 | 189 |
|
2500 | 190 |
logger.debug("enter Frame.addFromlist() for frame %s" % self.id) |
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
191 |
if self.showBoundary: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
192 |
self.drawBoundary(canv) |
253 | 193 |
|
1677
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
194 |
while len(drawlist) > 0: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
195 |
head = drawlist[0] |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
196 |
if self.add(head,canv,trySplit=0): |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
197 |
del drawlist[0] |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
198 |
else: |
1450177dd19e
Exterminated all tab characters and added a test to make sure
andy_robinson
parents:
1652
diff
changeset
|
199 |
#leave it in the list for later |
2013 | 200 |
break |