NSGraphicsContext richard@brainstorm.co.uk fedor@gnu.org GNUstep drawing context class. 1998,1999 Free Software Foundation, Inc. NSGraphicsContext

This is an abstract class which provides a framework for a device independant drawing.

In addition, this class provides methods to perform the actual drawing. As a convenience, you can also access these through various function interfaces. One is a Display Postscript interface using PS and DPS opeterations. Another is a Quartz interface (not yet written).

AppKit/NSGraphicsContext.h Description forthcoming. Description forthcoming. Description forthcoming. Description forthcoming. Description forthcoming. Description forthcoming. Description forthcoming. currentContext Returns the current context. Also see the convienience function GSCurrentContext() currentContextDrawingToScreen Returns YES if the current context is a display context graphicsContextWithAttributes: attributes

Create a graphics context with attributes, which contains key/value pairs which describe the specifics of how the context is to be initialized.

graphicsContextWithWindow: aWindow Create graphics context with attributes speficied by aWindow's device description. restoreGraphicsState Description forthcoming. saveGraphicsState Description forthcoming. setCurrentContext: context Set the current context that will handle drawing. setGraphicsState: graphicsState Description forthcoming. attributes Description forthcoming. flushGraphics Description forthcoming. focusStack Description forthcoming. graphicsPort Description forthcoming. imageInterpolation Description forthcoming. isDrawingToScreen Description forthcoming. restoreGraphicsState Description forthcoming. saveGraphicsState Description forthcoming. setFocusStack: stack Description forthcoming. setImageInterpolation: interpolation Description forthcoming. setShouldAntialias: antialias Description forthcoming. shouldAntialias Description forthcoming.
Software documentation for the NSGraphicsContext(GNUstep) category AppKit/NSGraphicsContext.h Description forthcoming. setDefaultContextClass: defaultContextClass Description forthcoming. contextDevice: num Description forthcoming. focusView Description forthcoming. initWithContextInfo: info Description forthcoming. lockFocusView: aView inRect: rect Description forthcoming. resetUsedFonts Description forthcoming. unlockFocusView: aView needsFlush: flush Description forthcoming. useFont: fontName Description forthcoming. usedFonts Description forthcoming. Software documentation for the NSGraphicsContext(NSGraphics) category AppKit/NSGraphicsContext.h Description forthcoming. GSWSetViewIsFlipped: flipped Description forthcoming. GSWViewIsFlipped Description forthcoming. NSBeep Description forthcoming. NSDrawBitmap: rect : pixelsWide : pixelsHigh : bitsPerSample : samplesPerPixel : bitsPerPixel : bytesPerRow : isPlanar : hasAlpha : colorSpaceName : data Description forthcoming. NSReadPixel: location Description forthcoming. Software documentation for the NSGraphicsContext(Ops) category AppKit/NSGraphicsContext.h Description forthcoming. DPSPrintf: fmt : args Description forthcoming. DPSWriteData: buf : count Description forthcoming. DPSarc: x : y : r : angle1 : angle2 Description forthcoming. DPSarcn: x : y : r : angle1 : angle2 Description forthcoming. DPSarct: x1 : y1 : x2 : y2 : r Description forthcoming. DPSashow: x : y : s Description forthcoming. DPSawidthshow: cx : cy : c : ax : ay : s Description forthcoming. DPScharpath: s : b Description forthcoming. DPSclip Description forthcoming. DPSclosepath Description forthcoming. DPScomposite: x : y : w : h : gstateNum : dx : dy : op Description forthcoming. DPScompositerect: x : y : w : h : op Description forthcoming. DPSconcat: m Description forthcoming. DPScurrentalpha: a Returns the current alpha component DPScurrentcmykcolor: c : m : y : k Returns the current color according to the CMYK color model DPScurrentflat: flatness Description forthcoming. DPScurrentgcdrawable: gc : draw : x : y Description forthcoming. DPScurrentgray: gray Returns the gray-level equivalent in the current color space. The value may depend on the current color space and may be 0 if the current color space has no notion of a gray value DPScurrentgstate: gst Depcreciated. Same as -GSReplaceGState: DPScurrenthsbcolor: h : s : b Returns the current color according to the HSB color model. DPScurrentlinecap: linecap Description forthcoming. DPScurrentlinejoin: linejoin Description forthcoming. DPScurrentlinewidth: width Description forthcoming. DPScurrentmiterlimit: limit Description forthcoming. DPScurrentoffset: x : y Description forthcoming. DPScurrentpoint: x : y Description forthcoming. DPScurrentrgbcolor: r : g : b Returns the current color according to the RGB color model DPScurrentstrokeadjust: b Description forthcoming. DPScurveto: x1 : y1 : x2 : y2 : x3 : y3 Description forthcoming. DPSdissolve: x : y : w : h : gstateNum : dx : dy : delta Description forthcoming. DPSeoclip Description forthcoming. DPSeofill Description forthcoming. DPSfill Description forthcoming. DPSflattenpath Description forthcoming. DPSgrestore Pops a previously saved gstate from the gstate stack and makes it current. Drawing information in the previously saved gstate becomes the current information DPSgsave Saves (pushes) a copy of the current gstate information onto the gstate stack. This saves drawing information contained in the gstate, such as the current path, ctm and colors. DPSgstate Depreciated. Use -DPSDefineGState to create a gstate it and tag it with a id tag. DPSinitclip Description forthcoming. DPSinitgraphics Description forthcoming. DPSinitmatrix Description forthcoming. DPSlineto: x : y Description forthcoming. DPSmoveto: x : y Description forthcoming. DPSnewpath Description forthcoming. DPSpathbbox: llx : lly : urx : ury Description forthcoming. DPSrcurveto: x1 : y1 : x2 : y2 : x3 : y3 Description forthcoming. DPSrectclip: x : y : w : h Description forthcoming. DPSrectfill: x : y : w : h Description forthcoming. DPSrectstroke: x : y : w : h Description forthcoming. DPSreversepath Description forthcoming. DPSrlineto: x : y Description forthcoming. DPSrmoveto: x : y Description forthcoming. DPSrotate: angle Description forthcoming. DPSscale: x : y Description forthcoming. DPSsetalpha: a Sets the alpha drawing component. For this and other color setting commands that have no differentiation between fill and stroke colors, both the fill and stroke alpha are set. DPSsetcmykcolor: c : m : y : k Sets the current colorspace to Device CMYK and the current color based on the indicated values. For this and other color setting commands that have no differentiation between fill and stroke colors, both the fill and stroke colors are set. DPSsetdash: pat : size : offset Description forthcoming. DPSsetflat: flatness Description forthcoming. DPSsetgcdrawable: gc : draw : x : y Description forthcoming. DPSsetgray: gray Sets the current colorspace to Device Gray and the current gray value DPSsetgstate: gst Makes the gstate indicated by the tag gst the current gstate. Note that the gstate is copied, so that changes to either gstate do not affect the other. DPSsethalftonephase: x : y Description forthcoming. DPSsethsbcolor: h : s : b Sets the current colorspace to Device RGB and the current color based on the indicated values DPSsetlinecap: linecap Description forthcoming. DPSsetlinejoin: linejoin Description forthcoming. DPSsetlinewidth: width Description forthcoming. DPSsetmiterlimit: limit Description forthcoming. DPSsetoffset: x : y Description forthcoming. DPSsetrgbcolor: r : g : b Sets the current colorspace to Device RGB and the current color based on the indicated values DPSsetstrokeadjust: b Description forthcoming. DPSshow: s Description forthcoming. DPSstroke Description forthcoming. DPStranslate: x : y Description forthcoming. DPSwidthshow: x : y : c : s Description forthcoming. DPSxshow: s : numarray : size Description forthcoming. DPSxyshow: s : numarray : size Description forthcoming. DPSyshow: s : numarray : size Description forthcoming. GSConcatCTM: ctm Description forthcoming. GSCurrentCTM Description forthcoming. GSDefineGState Creates a copy of the current gstate and associates it with a tag, which is given in the return value. This tag can later be used in -DPSsetgstate: to set the gstate as being current again. GSDrawImage: rect : imageref Description forthcoming. GSGetTextCTM Description forthcoming. GSGetTextPosition Description forthcoming. GSRectClipList: rects : count Description forthcoming. GSRectFillList: rects : count Description forthcoming. GSReplaceGState: gst Replaces the gstate refered to by the tag gst with the current gstate. The former gstate is destroyed. GSSendBezierPath: path Description forthcoming. GSSetCTM: ctm Description forthcoming. GSSetCharacterSpacing: extra Description forthcoming. GSSetFillColor: values Sets the current color for fill operations. The values array should have n components, where n corresponds to the number of color components required to specify the color in the current colorspace. GSSetFillColorspace: dict

Sets the colorspace for fill operations based on values in the supplied dictionary dict.

For device colorspaces (GSDeviceGray, GSDeviceRGB, GSDeviceCMYK), only the name of the colorspace needs to be set using the GSColorSpaceName key.

Other colorspaces will be documented later

GSSetFont: font Description forthcoming. GSSetFontSize: size Description forthcoming. GSSetStrokeColor: values Sets the current color for fill operations. The values array should have n components, where n corresponds to the number of color components required to specify the color in the current colorspace. GSSetStrokeColorspace: dict Sets the colorspace for stroke operations based on the values in the supplied dictionary. See -GSSetFillColorspace: for a description of the values that need to be supplied GSSetTextCTM: ctm Description forthcoming. GSSetTextDrawingMode: mode Description forthcoming. GSSetTextPosition: loc Description forthcoming. GSShowGlyphs: glyphs : length Description forthcoming. GSShowText: string : length Description forthcoming. GSUndefineGState: gst Disassociates the tag gst with it's gstate and destroys the gstate object. The tag will no longer be valid and should not be used to refer to the gstate again.