# HG changeset patch # User claus # Date 792030988 -3600 # Node ID 53c7dd275c3e74e6a48d0a62cff623f5ba160493 # Parent be90784ee668d44d82e49556ba62404b8623d733 *** empty log message *** diff -r be90784ee668 -r 53c7dd275c3e DObject.st --- a/DObject.st Thu Nov 17 15:31:40 1994 +0100 +++ b/DObject.st Mon Feb 06 01:36:28 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $ +$Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $ '! !DisplayObject class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $ +$Header: /cvs/stx/stx/libview2/Attic/DObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $ " ! @@ -83,6 +83,12 @@ !DisplayObject methodsFor:'queries'! +handlesKeyboardInput + "return true, if the receiver handles keyboard input" + + ^ false +! + canBeMoved "return true, if the receiver can be moved around" @@ -120,6 +126,12 @@ ^ false ! ! +!DisplayObject methodsFor:'converting'! + +asDisplayObject + ^ self +! ! + !DisplayObject methodsFor:'accessing'! frame @@ -210,14 +222,17 @@ |org left right top bott px py d2| + frame isNil ifTrue:[ + frame := self computeBoundingBox + ]. (delta == 0) ifTrue:[ ^ frame containsPoint:aPoint ]. " its quicker to not create a new rectangle for the test - (which is not obvious for simple lines, but complex polygons may - call this for many of its components) + (which is not obvious for simple lines, but complex polygons + or grouped objects may call this for many of its components) " org := frame origin. left := org x - delta. @@ -316,9 +331,9 @@ "draw the receivers outline at its origin offset by anOffset, aPoint" |org| - org := self origin + anOffset - aView viewOrigin. - aView displayRectangleX:(org x) y:(org y) - width:(frame width) height:(frame height) + org := self origin + anOffset. + aView displayRectangleX:org x y:org y + width:frame width height:frame height ! drawOutlineIn:aView @@ -330,7 +345,7 @@ drawOutlineIn:aView at:drawOrigin "draw the receivers outline at drawOrigin, aPoint" - self drawOutlineIn:aView offset:(drawOrigin - (self origin)) + self drawOutlineIn:aView offset:(drawOrigin - self origin) ! drawDragIn:aView at:drawOrigin diff -r be90784ee668 -r 53c7dd275c3e DisplayObject.st --- a/DisplayObject.st Thu Nov 17 15:31:40 1994 +0100 +++ b/DisplayObject.st Mon Feb 06 01:36:28 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $ +$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $ '! !DisplayObject class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.9 1994-11-17 14:24:56 claus Exp $ +$Header: /cvs/stx/stx/libview2/DisplayObject.st,v 1.10 1995-02-06 00:35:44 claus Exp $ " ! @@ -83,6 +83,12 @@ !DisplayObject methodsFor:'queries'! +handlesKeyboardInput + "return true, if the receiver handles keyboard input" + + ^ false +! + canBeMoved "return true, if the receiver can be moved around" @@ -120,6 +126,12 @@ ^ false ! ! +!DisplayObject methodsFor:'converting'! + +asDisplayObject + ^ self +! ! + !DisplayObject methodsFor:'accessing'! frame @@ -210,14 +222,17 @@ |org left right top bott px py d2| + frame isNil ifTrue:[ + frame := self computeBoundingBox + ]. (delta == 0) ifTrue:[ ^ frame containsPoint:aPoint ]. " its quicker to not create a new rectangle for the test - (which is not obvious for simple lines, but complex polygons may - call this for many of its components) + (which is not obvious for simple lines, but complex polygons + or grouped objects may call this for many of its components) " org := frame origin. left := org x - delta. @@ -316,9 +331,9 @@ "draw the receivers outline at its origin offset by anOffset, aPoint" |org| - org := self origin + anOffset - aView viewOrigin. - aView displayRectangleX:(org x) y:(org y) - width:(frame width) height:(frame height) + org := self origin + anOffset. + aView displayRectangleX:org x y:org y + width:frame width height:frame height ! drawOutlineIn:aView @@ -330,7 +345,7 @@ drawOutlineIn:aView at:drawOrigin "draw the receivers outline at drawOrigin, aPoint" - self drawOutlineIn:aView offset:(drawOrigin - (self origin)) + self drawOutlineIn:aView offset:(drawOrigin - self origin) ! drawDragIn:aView at:drawOrigin diff -r be90784ee668 -r 53c7dd275c3e GIFReader.st --- a/GIFReader.st Thu Nov 17 15:31:40 1994 +0100 +++ b/GIFReader.st Mon Feb 06 01:36:28 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1991 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.11 1994-11-17 14:29:27 claus Exp $ +$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.12 1995-02-06 00:36:28 claus Exp $ '! !GIFReader class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.11 1994-11-17 14:29:27 claus Exp $ +$Header: /cvs/stx/stx/libview2/GIFReader.st,v 1.12 1995-02-06 00:36:28 claus Exp $ " ! @@ -273,7 +273,8 @@ self makeGreyscale ]. - colorMap := Array with:redMap with:greenMap with:blueMap. +"/ colorMap := Array with:redMap with:greenMap with:blueMap. + colorMap := Colormap redVector:redMap greenVector:greenMap blueVector:blueMap. " GIFReader fromFile:'../fileIn/bitmaps/claus.gif @@ -284,9 +285,12 @@ readColorMap:colorMapSize "get gif colormap consisting of colorMapSize entries" - redMap := Array new:colorMapSize. - greenMap := Array new:colorMapSize. - blueMap := Array new:colorMapSize. +"/ redMap := Array new:colorMapSize. +"/ greenMap := Array new:colorMapSize. +"/ blueMap := Array new:colorMapSize. + redMap := ByteArray uninitializedNew:colorMapSize. + greenMap := ByteArray uninitializedNew:colorMapSize. + blueMap := ByteArray uninitializedNew:colorMapSize. 1 to:colorMapSize do:[:i | redMap at:i put:(inStream nextByte). greenMap at:i put:(inStream nextByte).