--- a/DeviceGraphicsContext.st Wed Aug 01 22:40:19 2018 +0200
+++ b/DeviceGraphicsContext.st Sat Aug 04 14:35:42 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
@@ -3310,6 +3312,17 @@
self displayDeviceString:aString from:1 to:(aString size) in:font x:x y:y
!
+fillDevicePolygon:aCollectionOfPoints
+ "draw a filled polygon in device coordinates"
+
+ gcId isNil ifTrue:[
+ self initGC
+ ].
+ device fillPolygon:aCollectionOfPoints in:drawableId with:gcId
+
+ "Created: / 04-08-2018 / 14:31:03 / Claus Gittinger"
+!
+
fillDeviceRectangleX:x y:y width:w height:h
"draw a filled rectangle in device coordinate space.
This ignores any transformations. The coordinates must be integers."
@@ -3529,30 +3542,29 @@
"Modified: 4.6.1996 / 17:58:21 / cg"
!
-fillPolygon:aPolygon
+fillPolygon:aCollectionOfPoints
"draw a filled polygon; apply transformation if nonNil"
|newPolygon|
gcId isNil ifTrue:[
- self initGC
+ self initGC
].
transformation notNil ifTrue:[
- newPolygon := aPolygon collect:[:point | transformation transformPoint:point].
+ newPolygon := aCollectionOfPoints collect:[:point | transformation transformPoint:point].
] ifFalse:[
- newPolygon := aPolygon
+ newPolygon := aCollectionOfPoints
].
(newPolygon contains:[:p |
- (p isPoint not
- or:[(p x class ~~ SmallInteger)
- or:[(p y class ~~ SmallInteger)]])
+ (p isPoint not
+ or:[(p x class ~~ SmallInteger)
+ or:[(p y class ~~ SmallInteger)]])
]) ifTrue:[
- newPolygon := newPolygon collect:[:p | p asPoint rounded]
+ newPolygon := newPolygon collect:[:p | p asPoint rounded]
].
- device
- fillPolygon:newPolygon
- in:drawableId
- with:gcId
+ device fillPolygon:newPolygon in:drawableId with:gcId
+
+ "Modified (format): / 04-08-2018 / 14:31:25 / Claus Gittinger"
!
fillRectangleX:x y:y width:w height:h