.
authorclaus
Tue, 06 Jun 1995 06:07:55 +0200
changeset 79 454362f799f5
parent 78 a708779d798c
child 80 e029e7deed8b
.
GIFReader.st
PlugAdptr.st
PluggableAdaptor.st
--- a/GIFReader.st	Tue Jun 06 06:04:53 1995 +0200
+++ b/GIFReader.st	Tue Jun 06 06:07:55 1995 +0200
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.14 1995-05-03 00:02:53 claus Exp $
+$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.15 1995-06-06 04:06:59 claus Exp $
 '!
 
 !GIFReader class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.14 1995-05-03 00:02:53 claus Exp $
+$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.15 1995-06-06 04:06:59 claus Exp $
 "
 !
 
@@ -165,11 +165,11 @@
      I hope later versions work too ..."
 
     (id ~= 'GIF87a') ifTrue:[
-        (id startsWith:'GIF') ifFalse:[
-            'GIFReader: not a gif file' errorPrintNL.
-            ^ nil
-        ].
-        'GIFReader: not a GIF87a file - hope that works' errorPrintNL.
+	(id startsWith:'GIF') ifFalse:[
+	    'GIFReader: not a gif file' errorPrintNL.
+	    ^ nil
+	].
+	'GIFReader: not a GIF87a file - hope that works' errorPrintNL.
     ].
 
     "get screen dimensions (not used)"
@@ -193,14 +193,14 @@
 
     "get colorMap"
     hasColorMap ifTrue:[
-        self readColorMap:colorMapSize
+	self readColorMap:colorMapSize
     ].
 
     "image separator"
     byte := aStream nextByte.
     (byte ~~ 16r2C) ifTrue:[
-        'GIFReader: corrupted gif file (no imgSep)' errorPrintNL.
-        ^ nil
+	'GIFReader: corrupted gif file (no imgSep)' errorPrintNL.
+	^ nil
     ].
 
     "get image data"
@@ -223,12 +223,12 @@
     "if image has a local colormap, this one is used"
 
     hasLocalColorMap ifTrue:[
-        "local descr. overwrites"
-        bitsPerPixel := (flag bitAnd:2r00000111) + 1.
-        colorMapSize := 1 bitShift:bitsPerPixel.
+	"local descr. overwrites"
+	bitsPerPixel := (flag bitAnd:2r00000111) + 1.
+	colorMapSize := 1 bitShift:bitsPerPixel.
 " 'local colormap' printNewline. "
-        "overwrite colormap"
-        self readColorMap:colorMapSize
+	"overwrite colormap"
+	self readColorMap:colorMapSize
     ].
 
     "get codelen for decompression"
@@ -240,65 +240,65 @@
     index := 1.
     count := aStream nextByte.
     [count notNil and:[count ~~ 0]] whileTrue:[
-        aStream nextBytes:count into:compressedData startingAt:index.
-        index := index + count.
-        count := aStream nextByte
+	aStream nextBytes:count into:compressedData startingAt:index.
+	index := index + count.
+	count := aStream nextByte
     ].
     compressedSize := index - 1.
 
     h := height.
     data := ByteArray new:((width + 1) * (h + 1)).
-    'GIFReader: decompressing ...' errorPrintNL.
+    'GIFReader: decompressing ...' infoPrintNL.
 
     self class decompressGIFFrom:compressedData
-                           count:compressedSize
-                            into:data
-                      startingAt:1
-                         codeLen:(codeLen + 1).
+			   count:compressedSize
+			    into:data
+		      startingAt:1
+			 codeLen:(codeLen + 1).
 
     interlaced ifTrue:[
-        Transcript showCr:'deinterlacing'.
-        tmp := ByteArray new:(data size).
+	Transcript showCr:'deinterlacing'.
+	tmp := ByteArray new:(data size).
 
-        "phase 1: 0, 8, 16, 24, ..."
+	"phase 1: 0, 8, 16, 24, ..."
 
-        srcOffset := 1.
-        0 to:(h - 1) by:8 do:[:dstRow |
-            dstOffset := dstRow * width + 1.
-            tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
-                       with:data startingAt:srcOffset.
-            srcOffset := srcOffset + width.
-        ].
+	srcOffset := 1.
+	0 to:(h - 1) by:8 do:[:dstRow |
+	    dstOffset := dstRow * width + 1.
+	    tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
+		       with:data startingAt:srcOffset.
+	    srcOffset := srcOffset + width.
+	].
 
-        "phase 2: 4, 12, 20, 28, ..."
+	"phase 2: 4, 12, 20, 28, ..."
 
-        4 to:(h - 1) by:8 do:[:dstRow |
-            dstOffset := dstRow * width + 1.
-            tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
-                       with:data startingAt:srcOffset.
-            srcOffset := srcOffset + width.
-        ].
+	4 to:(h - 1) by:8 do:[:dstRow |
+	    dstOffset := dstRow * width + 1.
+	    tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
+		       with:data startingAt:srcOffset.
+	    srcOffset := srcOffset + width.
+	].
 
-        "phase 3: 2, 6, 10, 14, ..."
+	"phase 3: 2, 6, 10, 14, ..."
 
-        2 to:(h - 1) by:4 do:[:dstRow |
-            dstOffset := dstRow * width + 1.
-            tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
-                       with:data startingAt:srcOffset.
-            srcOffset := srcOffset + width.
-        ].
+	2 to:(h - 1) by:4 do:[:dstRow |
+	    dstOffset := dstRow * width + 1.
+	    tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
+		       with:data startingAt:srcOffset.
+	    srcOffset := srcOffset + width.
+	].
 
-        "phase 4: 1, 3, 5, 7, ..."
+	"phase 4: 1, 3, 5, 7, ..."
 
-        1 to:(h - 1) by:2 do:[:dstRow |
-            dstOffset := dstRow * width + 1.
-            tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
-                       with:data startingAt:srcOffset.
-            srcOffset := srcOffset + width.
-        ].
+	1 to:(h - 1) by:2 do:[:dstRow |
+	    dstOffset := dstRow * width + 1.
+	    tmp replaceFrom:dstOffset to:(dstOffset + width - 1)
+		       with:data startingAt:srcOffset.
+	    srcOffset := srcOffset + width.
+	].
 
-        data := tmp.
-        tmp := nil
+	data := tmp.
+	tmp := nil
     ].
 
     photometric := #palette.
@@ -309,7 +309,7 @@
      could make it a greyscale image if so (currently not done)"
 
     self checkGreyscaleColormap ifTrue:[
-        self makeGreyscale
+	self makeGreyscale
     ].
         
     colorMap := Colormap redVector:redMap greenVector:greenMap blueVector:blueMap.
--- a/PlugAdptr.st	Tue Jun 06 06:04:53 1995 +0200
+++ b/PlugAdptr.st	Tue Jun 06 06:07:55 1995 +0200
@@ -11,7 +11,7 @@
 "
 
 ValueModel subclass:#PluggableAdaptor
-	 instanceVariableNames:'realModel getBlock putBlock updateBlock'
+	 instanceVariableNames:'model getBlock putBlock updateBlock'
 	 classVariableNames:''
 	 poolDictionaries:''
 	 category:'Interface-Support-Models'
@@ -35,7 +35,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview2/Attic/PlugAdptr.st,v 1.2 1995-05-17 12:22:21 claus Exp $
+$Header: /cvs/stx/stx/libview2/Attic/PlugAdptr.st,v 1.3 1995-06-06 04:07:55 claus Exp $
 "
 !
 
@@ -171,11 +171,11 @@
 !PluggableAdaptor methodsFor:'initialize-release'!
 
 model:anObject
-    realModel notNil ifTrue:[
-       realModel removeDependent:self
+    model notNil ifTrue:[
+       model removeDependent:self
     ].
-    realModel := anObject.
-    realModel addDependent:self
+    model := anObject.
+    model addDependent:self
 !
 
 subjectChannel:aValueHolder
@@ -244,24 +244,24 @@
 
 value
     getBlock notNil ifTrue:[
-	^ getBlock value:realModel 
+	^ getBlock value:model 
     ].
-    ^ realModel value "/ stupid default
+    ^ model value "/ stupid default
 !
 
 setValue:newValue 
     putBlock notNil ifTrue:[
-	^ putBlock value:realModel value:newValue 
+	^ putBlock value:model value:newValue 
     ].
-    realModel value:newValue "/ stupid default
+    model value:newValue "/ stupid default
 ! !
 
 !PluggableAdaptor methodsFor:'changes'!
 
 update:something with:aParameter from:changedObject
-    changedObject == realModel ifTrue:[
+    changedObject == model ifTrue:[
 	updateBlock notNil ifTrue:[
-	    (updateBlock value:realModel value:something value:aParameter)
+	    (updateBlock value:model value:something value:aParameter)
 	    ifTrue:[
 		self changed:#value
 	    ]
--- a/PluggableAdaptor.st	Tue Jun 06 06:04:53 1995 +0200
+++ b/PluggableAdaptor.st	Tue Jun 06 06:07:55 1995 +0200
@@ -11,7 +11,7 @@
 "
 
 ValueModel subclass:#PluggableAdaptor
-	 instanceVariableNames:'realModel getBlock putBlock updateBlock'
+	 instanceVariableNames:'model getBlock putBlock updateBlock'
 	 classVariableNames:''
 	 poolDictionaries:''
 	 category:'Interface-Support-Models'
@@ -35,7 +35,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview2/PluggableAdaptor.st,v 1.2 1995-05-17 12:22:21 claus Exp $
+$Header: /cvs/stx/stx/libview2/PluggableAdaptor.st,v 1.3 1995-06-06 04:07:55 claus Exp $
 "
 !
 
@@ -171,11 +171,11 @@
 !PluggableAdaptor methodsFor:'initialize-release'!
 
 model:anObject
-    realModel notNil ifTrue:[
-       realModel removeDependent:self
+    model notNil ifTrue:[
+       model removeDependent:self
     ].
-    realModel := anObject.
-    realModel addDependent:self
+    model := anObject.
+    model addDependent:self
 !
 
 subjectChannel:aValueHolder
@@ -244,24 +244,24 @@
 
 value
     getBlock notNil ifTrue:[
-	^ getBlock value:realModel 
+	^ getBlock value:model 
     ].
-    ^ realModel value "/ stupid default
+    ^ model value "/ stupid default
 !
 
 setValue:newValue 
     putBlock notNil ifTrue:[
-	^ putBlock value:realModel value:newValue 
+	^ putBlock value:model value:newValue 
     ].
-    realModel value:newValue "/ stupid default
+    model value:newValue "/ stupid default
 ! !
 
 !PluggableAdaptor methodsFor:'changes'!
 
 update:something with:aParameter from:changedObject
-    changedObject == realModel ifTrue:[
+    changedObject == model ifTrue:[
 	updateBlock notNil ifTrue:[
-	    (updateBlock value:realModel value:something value:aParameter)
+	    (updateBlock value:model value:something value:aParameter)
 	    ifTrue:[
 		self changed:#value
 	    ]