next up previous
Next: x_pointer Up: simxlib Previous: xcolormap

xcolors


     NAME
	  xcolors - part of Simula to Xlib interface

     DESCRIPTION
	     class XColors(maxSize);
	     integer maxSize;
	  Data class to	represent individual colors. A	XColor	object
	  can  have  a	maximum	 number	 of  colors,  defined with the
	  'maxSize' parameter at its creation. The  actual  number  of
	  such	 slots	 used  can  be	controlled  with  the  SetSize
	  operation. Each color	is defined  in	terms  of  RGB-vaules.
	  See  X11  tutorial  for details.  XColor objects are used as
	  parameters to	procedures in XColorMap	objects.

	  SUPERS: -
	  KIND:	Instantiable
	  INIT:	initializes itself.;
	  Sequencing: (Set/Get/SetSize/GetSize)	*

     OPERATIONS
     Set
	     procedure Set(index,pixel,red,green,blue,flags);
	     integer index;
	     integer pixel;
	     integer red,green,blue;
	     integer flags;!= DoRed/DoGreen/DoBlue, or sum of them;
	  Set the data for the index'th	color

     Get
	     procedure Get(index,pixel,red,green,blue,flags);
	     name pixel,red,green,blue,flags;
	     integer index;
	     integer pixel;
	     integer red,green,blue;
	     integer flags;!:= DoRed/DoGreen/DoBlue, or	sum of them;
	  Get the data for the index'th	color

     SetSize
	     procedure SetSize(n);
	     integer n;
	  Set the number of colors to be stored	in this	object

     GetSize
	     integer procedure GetSize;
	  Returns the current number of	colors stored in this object