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

x_graphicalcontext


     NAME
	  x_graphicalcontext - part of Simula to Xlib interface

     DESCRIPTION
	     Xlib_GraphicalContext class X_GraphicalContext(Screen);
	     ref(X_Screen) Screen;! GC only available on that Screen.;
	  Represents the shape of the pen to write with, widht,	 color
	  and  also  fonts  and	patterns it writes with. A 'GC'	can be
	  used for drawing in all XWindow (and XPixmap)	objects	on the
	  same	XDisplay,  and	the  same XScreen. An object of	 class
	  XRectangles	is   used   as	  parameter    to    operation
	  SetClipRectangles.  This  class  is  documented  as  part of
	  Drawable.

	  SUPERS: Xlib_GraphicalContext,Xlib_Object;
	  KIND:	Abstract, only subclass	is XGraphicalContext
	  INIT:	see subclass.
	  Sequencing: (<Misc>/<Back>/<Lines>/<Fill>/<Clip>)*
	  Misc=CopyGC/SetGraphicsExposures/SetFont/SetState
	  Back=SetBackground/SetForeground/SetPlaneMask/SetFunction
	  Lines=SetDashes/SetLineAttributes/SetArcMode
	  Fill=SetFillRule/SetFillStyle/SetStipple/SetTile/SetTSOrigin
	  Clip=SetClipMask/SetClipOrigin/SetClipRectangles/SetRegion/
	  :	SetSubwindowMode

     OPERATIONS
     CreateGC
	     Procedure CreateGC;
	  Create the corresponding data-structure on the X-Server. the
	  GC  will be attached to the Screen given as the parameter to
	  the Object.

	  NOTE:	this operation is  automatically  called  as  part  of
	  creating  a  new  object  of the sub-class GraphicalContext.
	  There	is thus	no need	for the	application programmer to call
	  this operation directly.

     CopyGC
	     Procedure CopyGC(SrcGC);
	     ref(X_GraphicalContext) SrcGC; ! The GC to	copy settings
	     from;
	  Copies all settings of SrcGC to this GC.

     SetArcMode
	     Procedure SetArcMode(arc_mode);
	     Integer arc_mode; ! ArcChord or ArcPieSlice.;
	  Sets how arcs	are filled. Possible values are:   ArcChord  -
	  join	endpoints  of  arc, and	ArcPieSlice -join endpoints to
	  center of arc.

     SetBackground
	     Procedure SetBackground(background);
	     Integer background;
	  Sets the background pixel value in the GC.

     SetClipMask
	     Procedure SetClipMask(pixmap);
	     ref(X_Pixmap) pixmap;
	  Sets the clip	mask pixmap in the GC.

     SetClipOrigin
	     Procedure SetClipOrigin(clip_x_origin,clip_y_origin);
	     Integer clip_x_origin,clip_y_origin;
	  Sets the clip	mask origin in the GC. The origin controls the
	  position of the clip mask pixmap set by SetClipMask.

     SetClipRectangles
	     Procedure SetClipRectangles(ClipXOrigin, ClipYOrigin,
	     Rects, Ordering);
	     Integer ClipXOrigin,ClipYOrigin;
	     integer Ordering; ! Unsorted/YSorted/YXSorted/YXBanded;
	     ref(XRectangles) Rects;
	  Sets the clip	mask of	the GC	to  the	 union	of  the	 given
	  rectangles.  Alternatives for	ordering is one	of:  Unsorted,
	  YSorted, YXSorted, and YXBanded.

     SetDashes
	     Procedure SetDashes(dash_offset,dash_list);
	     Integer dash_offset;
	     Text dash_list;
	  Sets the dash	line pattern of	the GC.

     SetFillRule
	     Procedure SetFillRule(fill_rule);
	     Integer fill_rule;	! EvenOddRule or WindingRule.;
	  Sets	the  fill  rule	 of  the  GC.	Possible  values  are:
	  EvenOddRule, and WindingRule.

     SetFillStyle
	     Procedure SetFillStyle(fill_style);
	     integer fill_style; !
	     Fill(Solid/Tiled/Stippled/OpaqueStippled).;
	  Sets the  fill  style	 of  the  GC.	Possible  values  are:
	  FillSolid, FillTiled,	FillStippled and FillOpaqueStippled.

     SetFont
	     Procedure SetFont(font);
	     ref(Xlib_font) font;
	  Sets the font	of the GC.

     SetForeground
	     Procedure SetForeground(foreground);
	     Integer foreground;
	  Sets the foreground pixel value of the GC.
     SetFunction
	     Procedure SetFunction(function);
	     Integer function; ! one of	the 16 binary functions.;
	  Sets the  function  used  when  merging  new	drawings  with
	  already  existing  graphics  on the screen.  Possible	values
	  are:

	  GXclear - =0
	  GXand	-  src AND dst
	  GXandReverse - src AND NOT dst
	  GXcopy - src
	  GXandInverted	- NOT src AND dst
	  GXnoop - dst
	  GXxor	- src XOR dst
	  GXor - src OR	dst
	  GXnor	- NOT src AND NOT dst
	  GXequiv - NOT	src XOR	dst
	  GXinvert - NOT dst
	  GXorReverse -	src OR NOT dst
	  GXcopyInverted - NOT src
	  GXorInverted - NOT src OR dst
	  GXnand - NOT src OR NOT dst
	  GXset	- =1

     SetGraphicsExposures
	     Procedure SetGraphicsExposures(graphics_exposures);
	     Boolean graphics_exposures;
	  Controls whether GraphicsExpose/NoExpose  events  should  be
	  generated or not.

     SetLineAttributes
	     Procedure SetLineAttributes(line_width,line_style,
	     cap_style,join_style);
	     integer line_width;
	     integer line_style;!
	     LineSolid/LineOnOffDash/LineDoubleDash;
	     integer cap_style;!
	     CapNotLast/CapButt/CapRound/CapProjecting;
	     integer join_style;! JoinMiter/JoinRound/JoinBevel;
	  Sets the line	attributes of  the  GC.	 Possible  values  are
	  listed for each parameter.

     SetPlaneMask
	     Procedure SetPlaneMask(plane_mask);
	     Integer plane_mask;
	  Selects the planes to	be affected by graphical operations.

     SetRegion
	     Procedure SetRegion(Region);
	     to	SetClipMask and	SetClipRectangles.;
	     ref(Xlib_Region) Region;
	  Sets the clip	mask  of  the  GC  to  the  specified  region.
	  Related

     SetState
	     Procedure
	     SetState(Foreground,Background,Function,PlaneMask);
	     Integer Foreground,Background,Function,PlaneMask;
	  Sets	the  foreground	 and  background  pixel	 values,   the
	  graphical function, and which	planes that are	to be affected
	  when drawing.	 You  can  alternatively  use  the  individual
	  operations   SetBackground,  SetForeground,SetFunction,  and
	  SetPlaneMask.	 See them for details.

     SetStipple
	     Procedure SetStipple(stipple);
	     ref (X_Pixmap) stipple;! the 'stipple' to use.;
	  Sets the pattern used	 when  drawing/filling	and  the  fill
	  style	is set to FillStippled or FillOpaqueStippled

     SetSubwindowMode
	     Procedure SetSubwindowMode(SubwindowMode);
	     integer SubwindowMode; !ClipByChildren/IncludeInferiors;
	  Controls  whether  drawings  should	be   clipped   against
	  subwindows or	not.  Possible values are:  ClipByChildren and
	  IncludeInferiors.

     SetTile
	     Procedure SetTile(tile);
	     ref(X_Pixmap) tile;
	  Determines the pattern used when filling and the fill	 style
	  is set to FillTiled

     SetTSOrigin
	     Procedure SetTSOrigin(TSXOrigin, TSYOrigin);
	     integer TSXOrigin;
	     integer TSYOrigin;
	  Sets the tile/stipple	origin in the GC. See also  SetStipple
	  and SetTile