Image.st
changeset 4995 3a5cb7a57b0b
parent 4994 2bc5eeefaee9
child 4996 933de2d71291
--- a/Image.st	Mon Jul 14 22:04:36 2008 +0200
+++ b/Image.st	Tue Jul 15 17:29:58 2008 +0200
@@ -8608,27 +8608,8 @@
     "
 !
 
-fillRectangle: aRectangle withColor:aColor
-    "draw a rectangle with some pixel value.
-    By using #atImageAndMask:put: it also works on images with mono masks."
-
-    |xI "{ Class: SmallInteger }"
-     yI "{ Class: SmallInteger }"
-     wI "{ Class: SmallInteger }"
-     hI "{ Class: SmallInteger }"|
-
-    xI := aRectangle left.
-    yI := aRectangle top.
-    wI := aRectangle width.
-    hI := aRectangle height.
-
-    yI to:yI+hI-1 do:[:yRun |
-	xI to:xI+wI-1 do:[:xRun |
-	    self atImageAndMask:xRun@yRun put:aColor
-	]
-    ]
-
-
+fillRectangle:aRectangle withColor:aColor
+    self fillRectangleX:aRectangle left y:aRectangle top width:aRectangle width height:aRectangle height withValue:(self valueFromColor:aColor)
 !
 
 fillRectangleX:x y:y width:w height:h with:aColor
@@ -11061,7 +11042,6 @@
     self photometric:(self class defaultPhotometric)
 ! !
 
-
 !Image methodsFor:'instance release'!
 
 close
@@ -13365,7 +13345,7 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.407 2008-07-14 20:04:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.408 2008-07-15 15:29:58 sr Exp $'
 ! !
 
 Image initialize!