Depth1Image.st
changeset 4767 61d7b2ee4939
parent 4419 a7b3e60e4f0a
child 4773 65c6b8654054
equal deleted inserted replaced
4766:61f4dd6b3ab3 4767:61d7b2ee4939
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
       
    13 "{ Package: 'stx:libview' }"
    12 "{ Package: 'stx:libview' }"
    14 
    13 
    15 Image subclass:#Depth1Image
    14 Image subclass:#Depth1Image
    16 	instanceVariableNames:''
    15 	instanceVariableNames:''
    17 	classVariableNames:''
    16 	classVariableNames:''
   600         ^ self paletteImageAsFormOn:aDevice.
   599         ^ self paletteImageAsFormOn:aDevice.
   601     ].
   600     ].
   602 
   601 
   603     "all colors are available, this is easy now"
   602     "all colors are available, this is easy now"
   604 
   603 
   605     f := Form width:width height:height fromArray:self bits on:aDevice.
   604     f := Form width:width height:height fromArray:self bits onDevice:aDevice.
   606     f notNil ifTrue:[
   605     f notNil ifTrue:[
   607         f colorMap:(Array with:color0 with:color1).
   606         f colorMap:(Array with:color0 with:color1).
   608 
   607 
   609         "/ remember deviceForm
   608         "/ remember deviceForm
   610 
   609 
   613             deviceForm := f.
   612             deviceForm := f.
   614             maskedPixelsAre0 := nil.
   613             maskedPixelsAre0 := nil.
   615         ]
   614         ]
   616     ].
   615     ].
   617     ^ f
   616     ^ f
       
   617 
       
   618     "Modified: / 29-05-2007 / 19:32:09 / cg"
   618 ! !
   619 ! !
   619 
   620 
   620 !Depth1Image methodsFor:'queries'!
   621 !Depth1Image methodsFor:'queries'!
   621 
   622 
   622 bitsPerPixel
   623 bitsPerPixel
   769 ! !
   770 ! !
   770 
   771 
   771 !Depth1Image class methodsFor:'documentation'!
   772 !Depth1Image class methodsFor:'documentation'!
   772 
   773 
   773 version
   774 version
   774     ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.54 2005-08-05 12:45:17 cg Exp $'
   775     ^ '$Header: /cvs/stx/stx/libview/Depth1Image.st,v 1.55 2007-05-29 17:32:27 cg Exp $'
   775 ! !
   776 ! !