eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FixedPalette':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: FixedPalette


Inheritance:

   Object
   |
   +--Collection
      |
      +--SequenceableCollection
         |
         +--Colormap
            |
            +--ColorPalette
               |
               +--FixedPalette
                  |
                  +--FixedPaletteWithAlpha

Package:
stx:libview
Category:
Graphics-Images-Support
Version:
rev: 1.9 date: 2022/02/23 08:07:43
user: cg
file: FixedPalette.st directory: libview
module: stx stc-classLibrary: libview

Description:


This class may (sooner or later) take over and/or redefine some of the Colormap functionality.
This migration will be done both to cleanup the code and for VW compatibility.

Notice: For now, the whole functionality is still in Colormap

copyright

COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  redShift: reds redMask: redm greenShift: grns greenMask: grnm blueShift: blus blueMask: blum


Instance protocol:

initialization
o  redShift: rs redMask: rm greenShift: gs greenMask: gm blueShift: bs blueMask: bm

printing & storing
o  displayString
(comment from inherited method)
return a string used when displaying the receiver in a view;
for example an Inspector. This is usually the same as printString,
but sometimes redefined for a better look.

Notice: displayString and displayOn: are for developers, debugging and inspectors,
whereas printString and printOn: are for the program to print data.

Note: the base method (used by the inspector) is #displayOn:.
So you should implement #displayOn: instead of #displayString in subclasses.

o  printOn: aStream
(comment from inherited method)
append a user readable representation of the receiver to aStream.
The text appended is not meant to be read back for reconstruction of
the receiver. Also, this method limits the size of generated string.

o  storeInstVarsOn: aStream

o  storeOn: aStream
(comment from inherited method)
append a representation to aStream, from which the receiver
can be reconstructed

queries
o  alphaByteAt: index
return the (simulated) alphaByte at index.
Notice that index is 1..

o  bitsAlpha

o  bitsBlue

o  bitsGreen

o  bitsRed

o  blueByteAt: index
return the (simulated) blueByte at index.
Notice that index is 1..

Usage example(s):

     (FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF) blueByteAt:16rFFFFFF+1  
     (FixedPalette redShift:10 redMask:16r1F greenShift:5 greenMask:16r1F blueShift:0 blueMask:16r1F) blueByteAt:16r7FFF+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) blueByteAt:16rFFFF+1  

     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) blueByteAt:0+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) blueByteAt:16r7FFF+1  

o  greenByteAt: index
return the (simulated) greenByte at index.
Notice that index is 1..

Usage example(s):

     (FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF) greenByteAt:16rFFFFFF+1  
     (FixedPalette redShift:10 redMask:16r1F greenShift:5 greenMask:16r1F blueShift:0 blueMask:16r1F) greenByteAt:16r7FFF+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) greenByteAt:16rFFFF+1  

     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) greenByteAt:0+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) greenByteAt:16r7FFF+1  

o  isFixedPalette

o  redByteAt: index
return the (simulated) redByte at index.
Notice that index is 1..

Usage example(s):

     (FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF) redByteAt:16rFFFFFF+1  
     (FixedPalette redShift:10 redMask:16r1F greenShift:5 greenMask:16r1F blueShift:0 blueMask:16r1F) redByteAt:16r7FFF+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) redByteAt:16rFFFF+1  

     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) redByteAt:0+1  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) redByteAt:16r7FFF+1  

o  size
return the number of (simulated) colors in this colormap

Usage example(s):

     (FixedPalette redShift:16 redMask:16rFF greenShift:8 greenMask:16rFF blueShift:0 blueMask:16rFF) size  
     (FixedPalette redShift:10 redMask:16r1F greenShift:5 greenMask:16r1F blueShift:0 blueMask:16r1F) size  
     (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) size  



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:37:06 GMT