cleanup - removed unused instvars
authorClaus Gittinger <cg@exept.de>
Fri, 28 Feb 2014 12:17:54 +0100
changeset 6284 ebd0dfb1322c
parent 6283 03b901746708
child 6285 87e579c41b7a
cleanup - removed unused instvars
Image.st
--- a/Image.st	Wed Feb 26 15:12:12 2014 +0100
+++ b/Image.st	Fri Feb 28 12:17:54 2014 +0100
@@ -12,9 +12,9 @@
 "{ Package: 'stx:libview' }"
 
 Object subclass:#Image
-	instanceVariableNames:'pixelStore bytes width height bitsPerPixel depth colorMap
+	instanceVariableNames:'pixelFunction bytes width height bitsPerPixel depth colorMap
 		maxPixelValue rowByteSize bitsPerSample samplesPerPixel
-		photometric redMask greenMask blueMask alphaMask device
+		photometric device
 		deviceForm monoDeviceForm fullColorDeviceForm mask
 		maskedPixelsAre0 fileName imageSequence'
 	classVariableNames:'Lobby DitherAlgorithm NumberOfDitherColors
@@ -45,7 +45,7 @@
 
 documentation
 "
-    this class provides representation for all kinds of images 
+    this class provides representation for all kinds of images
     (monochrome, greyscale and color) and will finally replace Form.
     Depths of 1, 2, 4, 8, 16, 24 and 32 are supported.
 
@@ -61,16 +61,16 @@
     This gives you a device independent image.
     For display, a device representation is required, which can be
     aquired by sending the
-        'onDevice:aDevice'
+	'onDevice:aDevice'
     message to the image. This creates a (possibly dithered) device-form,
     representing the image using the currently available colors.
 
     In rare cases, an explicit monochrome representation of the image is needed
     (some older X servers take monochrome icons only), this can be created by sending
     it the message
-        'monochromeOn:aDevice'.
-
-    As this class is very old and originated at times when typical graphic diplays only 
+	'monochromeOn:aDevice'.
+
+    As this class is very old and originated at times when typical graphic diplays only
     supported a limited number of colors (16 or 256), you will find a lot of code which deals
     with color allocation optimizations and dithering. Nowadays, these are hardly ever needed,
     and most of the time, images will be converted to 24bit truecolor (8x8x8) when converted
@@ -107,143 +107,143 @@
        DitherAlgorithm:
 
        nil                  a simple threshold algorithm
-                            (i.e. for mono, p<0.5 -> black, p>=0.5 -> white)
+			    (i.e. for mono, p<0.5 -> black, p>=0.5 -> white)
 
        #pattern             patterned dither
-                            (for p, take dithered color to fill pixel;
-                             uses dithering in color-class)
+			    (for p, take dithered color to fill pixel;
+			     uses dithering in color-class)
 
        #error               error diffusion dither (Floyd-Steinberg)
-                            planned - not yet implemented.
+			    planned - not yet implemented.
 
 
 
     [instance variables:]
 
-        width               <Integer>       the width in pixels
-        height              <Integer>       the height in pixels
-        bytes               <ByteArray>     the full image information
-        photometric         <Symbol>        #rgb, #palette, #blackIs0 or #whiteIs0
-        samplesPerPixel     <Integer>       the number of planes
-        bitsPerSample       <Array>         the number of bits per plane
-
-        colorMap            <Array>         only if photometric is #palette;
-                                            maps pixel values to r/g/b values.
-
-        device              <Workstation>   the device on which deviceForm,
-                                            monoDeviceForm and lowResDeviceForm are
-
-        deviceForm          <Form>          the device form which gives the best
-                                            possible aproximation of the image on
-                                            device using standard colors.
-
-        monoDeviceForm      <Form>          the device form which gives a monochrome
-                                            aproximation of the image on device.
-
-        fullColorDeviceForm <Form>          the device form which gives the best
-                                            possible aproximation of the image on
-                                            device using private colors.
-                                            (not yet implemented)
-
-        mask                <ImageMask>     an optional mask;
-                                            if non-nil, only pixels for which the
-                                            corresponding mask bit is non-zero
-                                            are drawn.
-
-        maskedPixelsAre0    <Boolean>       a hint for image processors and drawers
-                                            if true, masked pixels are known to be
-                                            zero in the pixel bytes.
-
-        fileName            <String>        the name of the file from which the
-                                            image was loaded - nil otherwise.
-                                            Useful for image save functions
-                                            and for the UIPainter utility.
-
-        imageSequence                       the imageSequence, of which the
-                                            instance is a frame or nil,
-                                            if its not part of a sequence.
-
-        bitsPerPixel                        not used in ST/X
-        depth                               - these have been added in instVar-slots
-        maxPixelValue                       - according to the ST-80's image class.
-        rowByteSize                         - to allow loading of st-80 images
-                                            - (which are stored as instVarAt:put: expressions)
+	width               <Integer>       the width in pixels
+	height              <Integer>       the height in pixels
+	bytes               <ByteArray>     the full image information
+	photometric         <Symbol>        #rgb, #palette, #blackIs0 or #whiteIs0
+	samplesPerPixel     <Integer>       the number of planes
+	bitsPerSample       <Array>         the number of bits per plane
+
+	colorMap            <Array>         only if photometric is #palette;
+					    maps pixel values to r/g/b values.
+
+	device              <Workstation>   the device on which deviceForm,
+					    monoDeviceForm and lowResDeviceForm are
+
+	deviceForm          <Form>          the device form which gives the best
+					    possible aproximation of the image on
+					    device using standard colors.
+
+	monoDeviceForm      <Form>          the device form which gives a monochrome
+					    aproximation of the image on device.
+
+	fullColorDeviceForm <Form>          the device form which gives the best
+					    possible aproximation of the image on
+					    device using private colors.
+					    (not yet implemented)
+
+	mask                <ImageMask>     an optional mask;
+					    if non-nil, only pixels for which the
+					    corresponding mask bit is non-zero
+					    are drawn.
+
+	maskedPixelsAre0    <Boolean>       a hint for image processors and drawers
+					    if true, masked pixels are known to be
+					    zero in the pixel bytes.
+
+	fileName            <String>        the name of the file from which the
+					    image was loaded - nil otherwise.
+					    Useful for image save functions
+					    and for the UIPainter utility.
+
+	imageSequence                       the imageSequence, of which the
+					    instance is a frame or nil,
+					    if its not part of a sequence.
+
+	bitsPerPixel                        not used in ST/X
+	depth                               - these have been added in instVar-slots
+	maxPixelValue                       - according to the ST-80's image class.
+	rowByteSize                         - to allow loading of st-80 images
+					    - (which are stored as instVarAt:put: expressions)
 
     [class variables:]
 
-        Lobby               <Registry>      keeps track of known images
-                                            (for resource freeing with garbage collector)
-
-        DitherAlgorithm     <Symbol>        defines how to dither
-
-        NumberOfDitherColors <Integer>      defines, how many dither colors to use
-
-        FileFormats         <Dictionary>    associates filename extensions to
-                                            image reader classes (now set-up in startup-file)
-
-        CollectGarbageWhenRunningOutOfColors
-                            <Boolean>       if true, and we run out of available
-                                            device colors during creation of a
-                                            device image, collect garbage for
-                                            possible image reclamation.
-                                            If false, proceed immediately.
-                                            Default is true.
-
-        ImageNotFoundQuerySignal
-                            <QuerySignal>   raised, if an image could not be loaded
-                                            from a file. The parameter is the images
-                                            fileName.
-                                            A handler may return a replacement
-                                            image or proceed with nil.
-                                            If unhandled, a nil is returned from the
-                                            image creation.
-
-        BadImageFormatQuerySignal
-                            <QuerySignal>   raised, if an image could not be loaded
-                                            from a file due to a file error or
-                                            unsupported format.
-                                            A handler may return a replacement
-                                            image or proceed with nil.
-                                            If unhandled, a nil is returned from the
-                                            image creation.
-
-        ImageSaveErrorSignal
-                            <Signal>        parent of errors below.
-
-        FileCreationErrorSignal
-                            <Signal>        file could not be created when saving an
-                                            image.
-
-        CannotRepresentImageSignal
-                            <Signal>        the specified ImageReader cannot represent
-                                            the given image.
-
-        InformationLostQuerySignal
-                            <Signal>        the specified ImageReader can represent
-                                            the given image, but some information
-                                            (typically color resolution) is lost.
-                                            If unhandled, the save proceeds as usual.
+	Lobby               <Registry>      keeps track of known images
+					    (for resource freeing with garbage collector)
+
+	DitherAlgorithm     <Symbol>        defines how to dither
+
+	NumberOfDitherColors <Integer>      defines, how many dither colors to use
+
+	FileFormats         <Dictionary>    associates filename extensions to
+					    image reader classes (now set-up in startup-file)
+
+	CollectGarbageWhenRunningOutOfColors
+			    <Boolean>       if true, and we run out of available
+					    device colors during creation of a
+					    device image, collect garbage for
+					    possible image reclamation.
+					    If false, proceed immediately.
+					    Default is true.
+
+	ImageNotFoundQuerySignal
+			    <QuerySignal>   raised, if an image could not be loaded
+					    from a file. The parameter is the images
+					    fileName.
+					    A handler may return a replacement
+					    image or proceed with nil.
+					    If unhandled, a nil is returned from the
+					    image creation.
+
+	BadImageFormatQuerySignal
+			    <QuerySignal>   raised, if an image could not be loaded
+					    from a file due to a file error or
+					    unsupported format.
+					    A handler may return a replacement
+					    image or proceed with nil.
+					    If unhandled, a nil is returned from the
+					    image creation.
+
+	ImageSaveErrorSignal
+			    <Signal>        parent of errors below.
+
+	FileCreationErrorSignal
+			    <Signal>        file could not be created when saving an
+					    image.
+
+	CannotRepresentImageSignal
+			    <Signal>        the specified ImageReader cannot represent
+					    the given image.
+
+	InformationLostQuerySignal
+			    <Signal>        the specified ImageReader can represent
+					    the given image, but some information
+					    (typically color resolution) is lost.
+					    If unhandled, the save proceeds as usual.
 
 
     caveat:
-        the information in
-            photometric, bitsPerPixel, bitsPerSample, samplesPerPixel, depth , colorMap and maxPixelValue
-        is partially redundant and its handling stupid (not to say: braindamaged ;-).
-        The only excuse is that it grew over time, had to incorporate various alien/older schemes for
-        compatibility reasons. All of the above belongs into the single colorMap which must migrate from
-        a stupid seqColl to a color-aware real colorMap.
-        (we are in the process of doing so...)
+	the information in
+	    photometric, bitsPerPixel, bitsPerSample, samplesPerPixel, depth , colorMap and maxPixelValue
+	is partially redundant and its handling stupid (not to say: braindamaged ;-).
+	The only excuse is that it grew over time, had to incorporate various alien/older schemes for
+	compatibility reasons. All of the above belongs into the single colorMap which must migrate from
+	a stupid seqColl to a color-aware real colorMap.
+	(we are in the process of doing so...)
 
     todo:
-        support alpha masks
-        cleanup the dithering & conversion code
-        cleanup the color/photometric mess
+	support alpha masks
+	cleanup the dithering & conversion code
+	cleanup the color/photometric mess
 
     [See also:]
-        Form Icon ImageReader
+	Form Icon ImageReader
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 "
 !
 
@@ -14216,11 +14216,11 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.446 2014-02-11 18:31:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.447 2014-02-28 11:17:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.446 2014-02-11 18:31:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.447 2014-02-28 11:17:54 cg Exp $'
 ! !