next up previous
Next: ximage Up: simxlib Previous: xregion

x_image


     NAME
	  x_image - part of Simula to Xlib interface

     DESCRIPTION
	     Xlib_Image	class X_Image(width,height);
	     integer width,height;
	  Represents an	Xlib 'image'  which  is	 a  data-area  on  the
	  Client  machine  containing  bit-map information. (Note that
	  XPixmap objects are similar, but reside  on  the  X-Server.)
	  Images  are  used to copy information	between	Client program
	  and Window Server in a Portable way. Some  operations	 (such
	  as  image  processing) is more efficient to do on the	Client
	  and the display the result with 'PutImage'.

	  SUPERS: Xlib_Image
	  KIND:	Abstract subclass XImage
	  INIT:	Call one of the	'create' operations.
	  Sequencing: <Create> (<Modify> / <Query> / PutImage)*	Free
	  : Create=CreateImage/GetImage/SubImage
	  : Modify=AddPixel/GetPixel/GetSubImage/PutPixel
	  :
	  Query=BitmapBitOrder/BitmapPad/BitmapUnit/ImageByteOrder/ImageFormat

     CREATION OPERATIONS
     Constants
	  the parameter	'Fmat' in the following	 procedures  can  take
	  one of the following values:XYBitmap	XYPixmap  ZPixmap.

	  The  parameter  'plane_mask'	can  be	 called	 with	value:
	  'AllPlanes'

     CreateImage
	     procedure
	     CreateImage(display,visual,depth,fmat,offset,data,
	     bitmap_pad,bytes_per_line);
	     ref (Xlib_Display)	display;
	     integer visual,depth,fmat,offset,data,
	     bitmap_pad,bytes_per_line;
	  Creates   an	 'image'    struct    with    the    specified
	  characteristics.  Does not create the	data buffer.

     GetImage
	     procedure GetImage(d,x,y,plane_mask,fmat);
	     ref (X_Drawable) d;
	     integer x,y,plane_mask,fmat;
	  Copies contents of a rectangle from a	drawable into an image

	  Creates the XImage struct and	the data buffer

     SubImage
	     procedure SubImage(image,x,y);
	     ref (X_Image) image;
	     integer x,y;
	  Creates a subimage from part of an image

     Free
	     procedure Free;
	  Releases any memory structures  that	may  be	 allaocted  on
	  behalf of this X_Image object.

     OUTPUT OPERATION
     PutImage
	     procedure
	     PutImage(d,src_x,src_y,dest_x,dest_y,width,height);
	     ref (X_Drawable) d;
	     integer src_x,src_y,dest_x,dest_y,width,height;
	  Draws	an image on a window or	a pixmap

     MODIFYING OPERATIONS
     AddPixel
	     procedure AddPixel(vallue);
	     integer vallue;
	  Adds vallue to all pixels in the image

     GetPixel
	     integer procedure GetPixel(x,y);
	     integer x,y;
	  Obtains a single pixel value from an image

     GetSubImage
	     procedure GetSubImage(d,x,y,width,height, plane_mask,
	     dest_x, dest_y);
	     ref (X_Drawable) d;
	     integer x,y,width,height,plane_mask,dest_x,dest_y;
	  Copies contents of  a	 rectangle  from  a  drawable  into  a
	  location

	  within the pre-existing image

     PutPixel
	     integer procedure PutPixel(x,y,pixel);
	     integer x,y,pixel;
	  Sets a pixel value in	an image

     IMAGE QUERY OPERATIONS
     BitmapBitOrder
	     integer procedure BitmapBitOrder(display);
	     ref(Xlib_Display) display;
	  Returns LSBFirst or MSBFirst

     BitmapPad
	     integer procedure BitmapPad(display);
	     ref(Xlib_Display) display;

     BitmapUnit
	     integer procedure BitmapUnit(display);
	     ref(Xlib_Display) display;

     ImageByteOrder
	     integer procedure ImageByteOrder(display);
	     ref(Xlib_Display) display;
	  Returns one of the following values:

	     LSBFirst  MSBFirst

     ImageFormat
	     integer procedure ImageFormat;
	  Returns Image	format of this Image.  One  of	the  following
	  values:

	     XYBitmap  XYPixmap	 ZPixmap