REF XGraphicsContext A.Schoter, August 1991 COPYRIGHT University of Sussex 1991. All Rights Reserved. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< X GRAPHIC CONTEXTS >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< The procedures and macros described in this ref file duplicate the equivalent Xlib C functions and constants relating to controlling graphic contexts. CONTENTS - (Use g to access required sections) 1 Note 2 Graphics Functions 3 Procedures ------- 1 Note ------- The procedures below are made available by doing: uses xlib, XGraphicsContext; For details see: Xlib - C Language X Interface, MIT X Consortium Standard, X Version 11, Release 4 Copyright (C) 1985, 1986, 1987, 1988, 1989 Massachusetts Institute of Technology, Cambridge, Massachusetts, and Digital Equipment Corporation, Maynard, Massachusetts. --------------------- 2 Graphics Functions --------------------- Graphics functions are used when a section of the screen (the destination) is updated with bits from elsewhere (the source) to give a new image. The exact effect that the update from the source has on the destination is determined by the display function. The following macros define the possible display functions. GXclear [macro] Defines a display function. Operation is new image = 0 - i.e. the destination is cleared to the background colour. GXand [macro] Defines a display function. Operation is new image = source AND destination GXandReverse [macro] Defines a display function. Operation is new image = source AND NOT(destination). GXcopy [macro] Defines a display function. Operation is new image = source. GXandInverted [macro] Defines a display function. Operation is new image = NOT(source) AND destination. GXnoop [macro] Defines a display function. Operation is new image = destination GXxor [macro] Defines a display function. Operation is new image = source XOR destination. GXor [macro] Defines a display function. Operation is new image = source OR destination. GXnor [macro] Defines a display function. Operation is new image = NOT(source) AND NOT(destination). GXequiv [macro] Defines a display function. Operation is new image = NOT(source) XOR destination. GXinvert [macro] Defines a display function. Operation is NOT(destination). GXorReverse [macro] Defines a display function. Operation is new image = source OR NOT(destination). GXcopyInverted [macro] Defines a display function. Operation is new image = NOT(source). GXorInverted [macro] Defines a display function. Operation is new image = NOT(source) OR destination. GXnand [macro] Defines a display function. Operation is new image = NOT(source) OR NOT(destination). GXset [macro] Defines a display function. Operation is new image = 1 - i.e. the destination is blocked with the foreground colour. ------------- 3 Procedures ------------- XGContextFrom(GCPtr) -> xid [procedure] XCreateGC(DspPtr,xid,ulong,XGCValPtr) -> GCPtr [procedure] XChangeGC(DspPtr,GCPtr,ulong,XGCValPtr) [procedure] XCopyGC(DspPtr,GCPtr1,ulong,GCPtr2) [procedure] XFreeGC(DspPtr,GCPtr) [procedure] XSetArcMode(DspPtr,GCPtr,int) [procedure] XSetClipMask(DspPtr,GCPtr,xid) [procedure] XSetClipOrigin(DspPtr,GCPtr,int1,int2) [procedure] XSetClipRectangles(DspPtr,GCPtr,int1,int2,XRectPtr, [procedure] int3,int4) XSetRegion(DspPtr,GCPtr,region) [procedure] XSetDashes(DspPtr,GCPtr,int1,CharPtr,int2) [procedure] XSetLineAttributes(DspPtr,GCPtr,uint,int1,int2,int3) [procedure] XSetFillRule(DspPtr,GCPtr,int) [procedure] XSetFillStyle(DspPtr,GCPtr,int) [procedure] XSetStipple(DspPtr,GCPtr,xid) [procedure] XSetTSOrigin(DspPtr,GCPtr,int1,int2) [procedure] XSetGraphicsExposures(DspPtr,GCPtr,int) [procedure] XSetForeground(DspPtr,GCPtr,ulong) [procedure] XSetBackground(DspPtr,GCPtr,ulong) [procedure] XSetFunction(DspPtr,GCPtr,int) [procedure] XSetPlaneMask(DspPtr,GCPtr,ulong) [procedure] XSetState(DspPtr,GCPtr,ulong1,ulong2,int,ulong3) [procedure] XSetSubwindowMode(DspPtr,GCPtr,int) [procedure] XGetGCValues(DspPtr, GCPtr, ulong, XGCValPtr) -> status [procedure] These procedures duplicate the equivalent C functions. --- C.x/x/pop/ref/XGraphicsContext --- Copyright University of Sussex 1991. All rights reserved.