author | Claus Gittinger <cg@exept.de> |
Tue, 18 Dec 2018 12:52:15 +0100 | |
changeset 4777 | b22943151ce0 |
parent 4080 | 8b66d15c3473 |
child 4769 | 89914ccfcf7d |
child 4837 | 12de5519f0b6 |
permissions | -rw-r--r-- |
4080 | 1 |
"{ Encoding: utf8 }" |
2 |
||
0 | 3 |
" |
4 | 4 |
COPYRIGHT (c) 1988 by Claus Gittinger |
68 | 5 |
All Rights Reserved |
0 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1303 | 14 |
"{ Package: 'stx:libbasic2' }" |
15 |
||
4080 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
78 | 18 |
Geometric subclass:#Polygon |
252 | 19 |
instanceVariableNames:'vertices' |
20 |
classVariableNames:'' |
|
21 |
poolDictionaries:'' |
|
1303 | 22 |
category:'Graphics-Geometry-Objects' |
0 | 23 |
! |
24 |
||
135 | 25 |
!Polygon class methodsFor:'documentation'! |
31 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1988 by Claus Gittinger |
|
68 | 30 |
All Rights Reserved |
0 | 31 |
|
31 | 32 |
This software is furnished under a license and may be used |
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
Polygon - an array of points |
|
78 | 44 |
|
31 | 45 |
Adds simple boundary checking methods to Array. |
46 |
(needs much more - such as inside check, area computation etc.) |
|
255 | 47 |
|
48 |
[author:] |
|
49 |
Claus Gittinger |
|
267 | 50 |
|
51 |
[see also:] |
|
331 | 52 |
Rectangle EllipticalArc Spline Circle Point LineSegment Curve |
53 |
Arrow ArroedSpline |
|
54 |
GraphicsContext StrokingWrapper FillingWrapper |
|
280 | 55 |
" |
56 |
! |
|
57 |
||
58 |
examples |
|
59 |
" |
|
60 |
simple polygon; filled & unfilled: |
|
61 |
[exBegin] |
|
62 |
|v p| |
|
63 |
||
64 |
v := (View extent:200@200) openAndWait. |
|
65 |
||
66 |
p := Polygon vertices: |
|
67 |
(Array with:(10@10) |
|
68 |
with:(90@90) |
|
69 |
with:(10@90)). |
|
70 |
||
71 |
v scale:2. |
|
72 |
v paint:Color blue. |
|
73 |
p displayFilledOn:v. |
|
74 |
||
75 |
v paint:Color red. |
|
76 |
p displayStrokedOn:v. |
|
77 |
||
78 |
v scale:1; translation:100@0. |
|
79 |
v paint:Color green. |
|
80 |
p displayFilledOn:v. |
|
81 |
||
82 |
v paint:Color black. |
|
83 |
p displayStrokedOn:v. |
|
84 |
[exEnd] |
|
85 |
||
86 |
arbitrary polygon; filled & unfilled: |
|
87 |
[exBegin] |
|
88 |
|v p| |
|
89 |
||
90 |
v := (View extent:200@200) openAndWait. |
|
91 |
v scale:2. |
|
92 |
||
93 |
p := Polygon vertices: |
|
94 |
(Array with:(10@10) |
|
95 |
with:(90@90) |
|
96 |
with:(50@90) |
|
97 |
with:(90@10) |
|
98 |
with:(10@90) |
|
99 |
). |
|
100 |
||
101 |
v paint:Color blue. |
|
102 |
p displayFilledOn:v. |
|
103 |
||
104 |
v paint:Color red. |
|
105 |
p displayStrokedOn:v. |
|
106 |
[exEnd] |
|
31 | 107 |
" |
108 |
! ! |
|
0 | 109 |
|
135 | 110 |
!Polygon class methodsFor:'instance creation'! |
111 |
||
112 |
fromRectangle:aRectangle |
|
280 | 113 |
"return a new polygon, taking the rectangles vertices" |
114 |
||
115 |
^ self new vertices:(aRectangle asPointArray) |
|
135 | 116 |
|
117 |
" |
|
118 |
Polygon fromRectangle:(50@50 corner:100@100) |
|
119 |
" |
|
280 | 120 |
|
121 |
"Modified: 8.5.1996 / 20:15:18 / cg" |
|
135 | 122 |
! |
78 | 123 |
|
124 |
vertices:anArrayOfPoints |
|
280 | 125 |
"return a new polygon, given a collection of vertices" |
126 |
||
78 | 127 |
^ self new vertices:anArrayOfPoints |
128 |
||
129 |
" |
|
130 |
Polygon vertices:(Array with:10@10 |
|
280 | 131 |
with:20@20 |
132 |
with:30@30) |
|
78 | 133 |
|
1430 | 134 |
Polygon vertices:(#(10 10 100 0 50 50) pairWiseCollect:[:x :y | x @ y]). |
135 |
" |
|
136 |
||
137 |
" |
|
138 |
|p v| |
|
139 |
||
140 |
v := View new openAndWait. |
|
141 |
p := Polygon |
|
142 |
vertices:(Array with:10@10 |
|
143 |
with:20@10 |
|
144 |
with:20@30). |
|
145 |
p displayOn:v |
|
78 | 146 |
" |
280 | 147 |
|
148 |
"Modified: 8.5.1996 / 20:11:31 / cg" |
|
135 | 149 |
! ! |
150 |
||
151 |
!Polygon methodsFor:'accessing'! |
|
152 |
||
2317 | 153 |
add:aPoint |
154 |
vertices isNil ifTrue:[ |
|
155 |
vertices := OrderedCollection new |
|
156 |
]. |
|
157 |
vertices add:aPoint |
|
158 |
! |
|
159 |
||
135 | 160 |
vertices |
161 |
"return the array containing my points" |
|
78 | 162 |
|
135 | 163 |
^ vertices |
164 |
! |
|
78 | 165 |
|
135 | 166 |
vertices:anArrayOfPoints |
167 |
"set the array containing my points" |
|
168 |
||
169 |
vertices := anArrayOfPoints |
|
78 | 170 |
! ! |
171 |
||
283 | 172 |
!Polygon methodsFor:'converting'! |
173 |
||
174 |
asPointArray |
|
175 |
"return an array containing my vertex points. |
|
176 |
Notice, that no copy of my vertices is created - you should not |
|
177 |
modify the returned collections points (unless you want to affect |
|
178 |
the polygon ...)." |
|
179 |
||
180 |
^ vertices |
|
181 |
||
182 |
"Modified: 8.5.1996 / 20:43:39 / cg" |
|
183 |
! ! |
|
184 |
||
135 | 185 |
!Polygon methodsFor:'displaying'! |
78 | 186 |
|
135 | 187 |
displayFilledOn:aGC |
267 | 188 |
"display a filled polygin as represented by the receiver in |
189 |
the graphicsContext, aGC" |
|
190 |
||
135 | 191 |
aGC fillPolygon:vertices |
78 | 192 |
|
193 |
" |
|
135 | 194 |
|v| |
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
195 |
v := View new openAndWait. |
135 | 196 |
|
197 |
(Polygon vertices:( |
|
267 | 198 |
Array |
199 |
with:10@10 |
|
200 |
with:60@10 |
|
201 |
with:35@60)) displayFilledOn:v |
|
135 | 202 |
|
203 |
|v| |
|
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
204 |
v := View new openAndWait. |
78 | 205 |
|
135 | 206 |
(Polygon vertices:( |
267 | 207 |
Array |
208 |
with:10@10 |
|
209 |
with:60@10 |
|
210 |
with:35@60 |
|
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
211 |
with:10@10)) displayStrokedOn:v |
78 | 212 |
" |
267 | 213 |
|
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
214 |
"Modified: 8.5.1996 / 14:41:47 / cg" |
78 | 215 |
! |
216 |
||
135 | 217 |
displayStrokedOn:aGC |
267 | 218 |
"display an unfilled polygin as represented by the receiver in |
219 |
the graphicsContext, aGC" |
|
220 |
||
135 | 221 |
aGC displayPolygon:vertices |
222 |
||
223 |
" |
|
224 |
|v| |
|
225 |
||
226 |
v := View new open. |
|
227 |
[v shown] whileFalse:[Processor yield]. |
|
228 |
||
229 |
(Polygon vertices:( |
|
267 | 230 |
Array |
231 |
with:10@10 |
|
232 |
with:60@10 |
|
233 |
with:35@60)) displayStrokedOn:v |
|
135 | 234 |
|
235 |
|v| |
|
236 |
||
237 |
v := View new open. |
|
238 |
[v shown] whileFalse:[Processor yield]. |
|
239 |
||
240 |
(Polygon vertices:( |
|
267 | 241 |
Array |
242 |
with:10@10 |
|
243 |
with:60@10 |
|
244 |
with:35@60 |
|
245 |
with:10@10)) displayStrokedOn:v |
|
135 | 246 |
" |
247 |
||
267 | 248 |
"Modified: 27.4.1996 / 14:52:29 / cg" |
135 | 249 |
! ! |
250 |
||
251 |
!Polygon methodsFor:'enumerating'! |
|
252 |
||
78 | 253 |
edgesDo:aTwoArgBlock |
254 |
"evaluate aTwoArgBlock for each pair of vertices" |
|
255 |
||
256 |
1 to:vertices size-1 do:[:i | |
|
257 |
aTwoArgBlock value:(vertices at:i) value:(vertices at:i+1) |
|
258 |
]. |
|
259 |
||
260 |
" |
|
261 |
|v p| |
|
262 |
||
263 |
v := View new open. |
|
264 |
[v shown] whileFalse:[Processor yield]. |
|
265 |
||
266 |
p := Polygon vertices:(Array with:5@5 |
|
267 |
with:50@5 |
|
268 |
with:30@30 |
|
269 |
with:5@5). |
|
270 |
||
271 |
p displayOn:v. |
|
272 |
(Delay forSeconds:3) wait. |
|
273 |
||
274 |
p edgesDo:[:p1 :p2 | v lineWidth:3. v displayLineFrom:p1 to:p2] |
|
275 |
" |
|
276 |
! |
|
277 |
||
135 | 278 |
verticesDo:aBlock |
279 |
"evaluate aBlock for each point" |
|
280 |
||
281 |
vertices do:aBlock |
|
282 |
||
283 |
" |
|
284 |
|v p| |
|
285 |
||
286 |
v := View new open. |
|
287 |
[v shown] whileFalse:[Processor yield]. |
|
78 | 288 |
|
135 | 289 |
p := Polygon vertices:(Array with:5@5 |
290 |
with:50@5 |
|
291 |
with:30@30 |
|
292 |
with:5@5). |
|
293 |
||
294 |
p displayOn:v. |
|
295 |
(Delay forSeconds:3) wait. |
|
296 |
||
297 |
p verticesDo:[:p | v displayRectangleX:p x -3 y:p y -3 width:6 height:6] |
|
298 |
" |
|
78 | 299 |
! ! |
300 |
||
135 | 301 |
!Polygon methodsFor:'queries'! |
0 | 302 |
|
303 |
bottom |
|
14 | 304 |
"return the bottom boundary of the polygon, |
305 |
that is the maximum y coordinate of all its points" |
|
306 |
||
78 | 307 |
(vertices size == 0) ifTrue: [^ nil]. |
308 |
^ vertices inject:(vertices at:1) y into:[:maxSoFar :p | maxSoFar max:(p y)] |
|
0 | 309 |
|
78 | 310 |
" |
311 |
(Polygon vertices:( |
|
312 |
Array |
|
313 |
with:10@10 |
|
314 |
with:60@10 |
|
315 |
with:35@60)) bottom |
|
316 |
" |
|
0 | 317 |
! |
318 |
||
490
ef43c7a69346
added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
319 |
computeBounds |
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
320 |
"return the smallest enclosing rectangle" |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
321 |
|
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
322 |
|minX maxX minY maxY t n "{ Class: SmallInteger }" | |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
323 |
|
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
324 |
n := vertices size. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
325 |
n == 0 ifTrue:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
326 |
^ nil "/ mhmh - should we return an empty rectangle here ? |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
327 |
]. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
328 |
t := vertices at:1. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
329 |
minX := maxX := t x. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
330 |
minY := maxY := t y. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
331 |
2 to:n do:[:i | |
4080 | 332 |
|x y| |
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
333 |
|
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
334 |
t := vertices at:i. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
335 |
x := t x. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
336 |
y := t y. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
337 |
x < minX ifTrue:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
338 |
minX := x. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
339 |
] ifFalse:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
340 |
x > maxX ifTrue:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
341 |
maxX := x. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
342 |
] |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
343 |
]. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
344 |
y < minY ifTrue:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
345 |
minY := y. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
346 |
] ifFalse:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
347 |
y > maxY ifTrue:[ |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
348 |
maxY := y. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
349 |
] |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
350 |
]. |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
351 |
]. |
283 | 352 |
^ Rectangle left:minX top:minY right:maxX bottom:maxY. |
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
353 |
|
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
354 |
" |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
355 |
|p| |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
356 |
|
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
357 |
p := (Polygon vertices:( |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
358 |
Array |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
359 |
with:10@10 |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
360 |
with:60@10 |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
361 |
with:35@60)). |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
362 |
p bounds |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
363 |
" |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
364 |
|
283 | 365 |
"Modified: 8.5.1996 / 20:51:42 / cg" |
490
ef43c7a69346
added dummy Scale & InverseScale classVars.
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
366 |
"Created: 12.2.1997 / 11:44:11 / cg" |
276
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
367 |
! |
e104a0359515
comments & more Geometric functionality
Claus Gittinger <cg@exept.de>
parents:
267
diff
changeset
|
368 |
|
2091 | 369 |
containsPoint:aPoint |
370 |
"return true, if the argument, aPoint is contained in the receiver" |
|
371 |
||
372 |
|angle pPrev p1 p2 angle2D| |
|
373 |
||
374 |
angle2D := [:p1 :p2 | |
|
375 |
"/ Return the angle between two vectors on a plane |
|
376 |
"/ The angle is from vector 1 to vector 2, positive anticlockwise |
|
377 |
"/ The result is between -pi -> pi |
|
378 |
|theta theta1 theta2| |
|
379 |
||
380 |
theta1 := p1 x arcTan2:p1 y. |
|
381 |
theta2 := p2 x arcTan2:p2 y. |
|
382 |
theta := theta2 - theta1. |
|
383 |
[theta > Float pi] whileTrue:[ |
|
384 |
theta := theta - (Float pi * 2) |
|
385 |
]. |
|
386 |
[ theta < (Float pi negated) ] whileTrue:[ |
|
387 |
theta := theta + (Float pi * 2) |
|
388 |
]. |
|
389 |
theta |
|
390 |
]. |
|
391 |
||
392 |
angle := 0. |
|
393 |
||
394 |
pPrev := vertices last. |
|
395 |
vertices do:[:pI | |
|
396 |
p1 := pPrev - aPoint. |
|
397 |
p2 := pI - aPoint. |
|
398 |
angle := angle + (angle2D value:p1 value:p2). |
|
399 |
pPrev := pI. |
|
400 |
]. |
|
401 |
||
402 |
^ angle abs >= Float pi |
|
403 |
||
404 |
" |
|
405 |
|p| |
|
406 |
||
407 |
p := Polygon vertices:(Array |
|
408 |
with:10@10 |
|
409 |
with:30@10 |
|
410 |
with:20@20). |
|
411 |
TestCase assert:(p containsPoint:14@11). |
|
412 |
TestCase assert:(p containsPoint:15@15). |
|
413 |
TestCase assert:(p containsPoint:5@15) not. |
|
414 |
TestCase assert:(p containsPoint:15@5) not. |
|
415 |
TestCase assert:(p containsPoint:30@15) not. |
|
416 |
TestCase assert:(p containsPoint:20@15). |
|
417 |
" |
|
418 |
! |
|
419 |
||
0 | 420 |
left |
14 | 421 |
"return the left boundary of the polygon, |
422 |
that is the minimum x coordinate of all its points" |
|
423 |
||
78 | 424 |
(vertices size == 0) ifTrue: [^ nil]. |
425 |
^ vertices inject:(vertices at:1) x into:[:minSoFar :p | minSoFar min:(p x)] |
|
0 | 426 |
|
78 | 427 |
" |
428 |
(Polygon vertices:( |
|
429 |
Array |
|
430 |
with:10@10 |
|
431 |
with:60@10 |
|
432 |
with:35@60)) left |
|
433 |
" |
|
434 |
||
0 | 435 |
! |
436 |
||
437 |
right |
|
14 | 438 |
"return the right boundary of the polygon, |
88 | 439 |
that is the maximum x coordinate of all its points" |
14 | 440 |
|
78 | 441 |
(vertices size == 0) ifTrue: [^ nil]. |
442 |
^ vertices inject:(vertices at:1) x into:[:maxSoFar :p | maxSoFar max:(p x)] |
|
443 |
||
444 |
" |
|
445 |
(Polygon vertices:( |
|
446 |
Array |
|
447 |
with:10@10 |
|
448 |
with:60@10 |
|
449 |
with:35@60)) right |
|
450 |
" |
|
451 |
||
135 | 452 |
! |
78 | 453 |
|
135 | 454 |
top |
455 |
"return the top boundary of the polygon, |
|
456 |
that is the minimum y coordinate of all its points" |
|
78 | 457 |
|
135 | 458 |
(vertices size == 0) ifTrue: [^ nil]. |
459 |
^ vertices inject:(vertices at:1) y into:[:minSoFar :p | minSoFar min:(p y)] |
|
78 | 460 |
|
461 |
" |
|
462 |
(Polygon vertices:( |
|
463 |
Array |
|
464 |
with:10@10 |
|
465 |
with:60@10 |
|
135 | 466 |
with:35@60)) top |
78 | 467 |
" |
468 |
||
135 | 469 |
! ! |
78 | 470 |
|
2158 | 471 |
!Polygon methodsFor:'testing'! |
472 |
||
473 |
canBeFilled |
|
474 |
"return true, if the receiver can be drawn as a filled geometric. |
|
475 |
Always true here." |
|
476 |
||
477 |
^ true |
|
478 |
||
479 |
"Created: 8.5.1996 / 08:16:53 / cg" |
|
480 |
! ! |
|
481 |
||
135 | 482 |
!Polygon class methodsFor:'documentation'! |
78 | 483 |
|
135 | 484 |
version |
4080 | 485 |
^ '$Header$' |
2317 | 486 |
! |
487 |
||
488 |
version_CVS |
|
4080 | 489 |
^ '$Header$' |
0 | 490 |
! ! |
4080 | 491 |