next up previous
Next: xpixmap Up: simxlib Previous: xclasshint

x_pixmap


     NAME
	  x_pixmap - part of Simula to Xlib interface

     DESCRIPTION
	     Xlib_Pixmap class X_Pixmap(FatherScreen);
	     ref(X_Screen) FatherScreen;
	  Used for Offline drawing. Its	Apperance can be  pre-defined,
	  loaded  from	a  file	 or  drawn directly. Used for defining
	  patterns and small pictures.	See also XPixmap

	  SUPERS: Xlib_pixmap,X_drawable,Xlib_drawable,Xlib_object
	  KIND:	Abstract, use sub-class	XPixmap.
	  INIT:	call one of the	'Create' operations.
	  Sequencing: CreatePixmap/CreateBitmapFromData/
	  :	      CreatePixmapFromBitmapData/ReadBitmapFile
	  :	      (WriteBitmapFile/<used as	parameter>)* Free

     OPERATIONS
     getScreen
	     ref (Xlib_Screen) procedure getScreen;
	  Returns the FatherScreen, parameter to the class

     CreateBitmapFromData
	     procedure CreateBitmapFromData(data,wdth,hght);
	     text data;
	     integer wdth,hght;
	  Create a bitmap (a  single-plane  pixmap)  from  X11	bitmap
	  format data.

     CreatePixmap
	     procedure CreatePixmap(wdth,hght,dpth);
	     integer  wdth,hght;
	     integer  dpth; !specifies the depth of the	pixmap.	Must
	     be	valid on the
	     screen specified by FatherScreen.RootWindowID;
	  Create a pixmap, initally empty, use	X_Drawable  operations
	  to define its	apperance.

     CreatePixmapFromBitmapData
	     procedure
	     CreatePixmapFromBitmapData(data,wdth,hght,fg,bg,dpth);
	     text data;	!Specifies the data in bitmap format.;
	     integer wdth,hght;	!Specifies the width and height	in
	     pixels of the pixmap to create.;
	     integer fg,bg; !Specifies the foreground and background
	     pixel values to use.;
	     integer dpth; !Specifies the depth	of the pixmap. Must be
	     valid on the screen specified by
	     FatherScreen.RootWindowID.;
	  Create a bitmap with depth from bitmap data.

     ReadBitmapFile
	     integer procedure ReadBitmapFile(filename);
	     text    filename;
	  Read a bitmap	 from  file.  Returns  one  of	the  following
	  values.  (constants defined as attributes of this class):

		BitmapSuccess	 BitmapOpenFailed    BitmapFileInvalid
	  BitmapNoMemory

     WriteBitmapFile
	     integer procedure WriteBitmapFile(filename);
	     text filename;
	  write	a bitmap to a file. The	file is	written	in the	format
	  created   by	 the   X   version   11	 bitmap	 program.  See
	  ReadBitmapFile for return values.

     Free
	     procedure Free;
	  deallocate any x Server datastructures alloacted  on	behalf
	  of this object.

     ATTRIBUTES
     Width,Height
	     integer Width,Height;

     Depth
	     integer Depth;
	  Specifies the	depth of the pixmap.  Must  be	valid  on  the
	  screen  specified  by	FatherScreen.RootWindowID, (Default=1,
	  B/W)

     X_hot,Y_hot
	     integer X_hot, Y_hot;
	  Specifies where to place the hotspot coordinates  (or	 -1,-1
	  if none present, Default) in a bitmap	file