*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 28 Apr 2003 12:15:34 +0200
changeset 3865 18532e89cdca
parent 3864 b04f2f0c5eae
child 3866 c01473a90934
*** empty log message ***
Image.st
MappedPalette.st
--- a/Image.st	Mon Apr 28 12:14:49 2003 +0200
+++ b/Image.st	Mon Apr 28 12:15:34 2003 +0200
@@ -2186,7 +2186,7 @@
         #( red0 green0 blue0  red1 green1 blue1 ... redN greenN blueN)
      where each component must be a byteValue in 0..255."
 
-    self colorMap:(MappedPalette rgbBytesVector:anArray)
+    self colorMap:(Colormap "MappedPalette" rgbBytesVector:anArray)
 !
 
 colorMapFromRGBValueArray:anArray
@@ -2195,7 +2195,7 @@
         #( rgb0 rgb1  ... rgbN)
      where each element must be an rgbValue in 0..FFFFFF."
 
-    self colorMap:(MappedPalette rgbValueVector:anArray)
+    self colorMap:(Colormap "MappedPalette" rgbValueVector:anArray)
 !
 
 container:aVisualContainer
@@ -5866,74 +5866,14 @@
     "Modified: 29.5.1996 / 10:52:36 / cg"
 !
 
-asOrderedDitheredGrayImageDepth:depth
-    "return a dithered depth-x grey image from the receiver image.
-     Uses an 8x8 dithermatrix."
-
-    |dither|
-
-    dither := self class orderedDitherMatrixOfSize:8.
-
-    (depth == 1) ifTrue:[
-	"/ for monochrome, there is highly specialized
-	"/ monochrome dither code available
-
-	^ Depth1Image
-	    width:width
-	    height:height
-	    fromArray:(
-		self
-		    orderedDitheredMonochromeBitsWithDitherMatrix:dither
-		    ditherWidth:8)
-    ].
-
-    ^ (self class implementorForDepth:depth)
-	width:width
-	height:height
-	fromArray:(
-	    self
-		orderedDitheredGrayBitsWithDitherMatrix:dither
-		ditherWidth:8
-		depth:depth)
-
-    "
-     |i i1 i2 i4 i8|
-
-     i := Image fromFile:'goodies/bitmaps/claus.gif'.
-     i1 := i asOrderedDitheredGrayImageDepth:1.
-     i1 inspect.
-
-     i2 := i asOrderedDitheredGrayImageDepth:2.
-     i2 inspect.
-
-     i4 := i asOrderedDitheredGrayImageDepth:4.
-     i4 inspect.
-
-     i8 := i asOrderedDitheredGrayImageDepth:8.
-     i8 inspect.
-    "
-
-    "
-     |i i1 i2 i4 i8|
-     i := Image fromFile:'goodies/bitmaps/garfield.gif'.
-     i1 := i asOrderedDitheredGrayImageDepth:1.
-     i1 inspect.
-
-     i2 := i asOrderedDitheredGrayImageDepth:2.
-     i2 inspect.
-
-     i4 := i asOrderedDitheredGrayImageDepth:4.
-     i4 inspect.
-
-     i8 := i asOrderedDitheredGrayImageDepth:8.
-     i8 inspect.
-
-     i2 := i8 asOrderedDitheredGrayImageDepth:2.
-     i2 inspect.
-    "
-
-    "Created: 7.6.1996 / 18:03:54 / cg"
-    "Modified: 24.6.1997 / 22:19:36 / cg"
+displayOn:aGC x:x y:y
+    "draw the receiver in the graphicsContext, aGC.
+     Smalltalk-80 compatibility"
+
+    aGC displayForm:self x:x y:y.
+
+    "Modified: 23.4.1996 / 11:12:31 / cg"
+    "Created: 12.5.1996 / 20:14:31 / cg"
 !
 
 displayOn:aGC x:x y:y opaque:opaque
@@ -12536,7 +12476,7 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.335 2003-04-28 10:14:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.336 2003-04-28 10:15:21 cg Exp $'
 ! !
 
 Image initialize!
--- a/MappedPalette.st	Mon Apr 28 12:14:49 2003 +0200
+++ b/MappedPalette.st	Mon Apr 28 12:15:34 2003 +0200
@@ -12,7 +12,7 @@
 
 
 
-"{ Package: 'stx:libcompat' }"
+"{ Package: 'stx:libview' }"
 
 ColorPalette subclass:#MappedPalette
 	instanceVariableNames:''
@@ -56,7 +56,7 @@
 blackWhite
     "ST-80 compatibility"
 
-    ^ super fromColors:(Array with:(Color black) with:(Color white))
+    ^ self fromColors:(Array with:(Color black) with:(Color white))
 
     "Created: 7.10.1996 / 11:31:08 / cg"
     "Modified: 14.2.1997 / 17:43:24 / cg"
@@ -73,7 +73,7 @@
 whiteBlack
     "ST-80 compatibility"
 
-    ^ super fromColors:(Array with:(Color white) with:(Color black))
+    ^ self fromColors:(Array with:(Color white) with:(Color black))
 
     "Created: 7.10.1996 / 11:29:01 / cg"
     "Modified: 14.2.1997 / 17:43:31 / cg"
@@ -82,5 +82,5 @@
 !MappedPalette class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/MappedPalette.st,v 1.2 2003-04-10 14:48:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/MappedPalette.st,v 1.3 2003-04-28 10:15:34 cg Exp $'
 ! !