NAME
TkCanvasPsY, TkCanvasPsBitmap, TkCanvasPsColor, TkCanvasPsFont,TkCanvasPsPath, TkCanvasPsStipple - utility procedures for generating
Postscript for canvasesSYNOPSIS
##iinncclluuddee <
double TTkkCCaannvvaassPPssYY(canvas, canvasY) int TTkkCCaannvvaassPPssBBiittmmaapp(interp, canvas, bitmap, x, y, width, height) int TTkkCCaannvvaassPPssCCoolloorr(interp, canvas, colorPtr) int TTkkCCaannvvaassPPssFFoonntt(interp, canvas, tkFont) TTkkCCaannvvaassPPssPPaatthh(interp, canvas, coordPtr, numPoints) int TTkkCCaannvvaassPPssSSttiippppllee(interp, canvas, bitmap) AARRGGUUMMEENNTTSS TkCanvas canvas (in) A token that identifies a canvas widget for which Postscript is being generated.> double canvasY (in) Y-coordinate in the space of the
canvas. TclInterp *interp (in/out) A Tcl interpreter; Postscript is appended to its result, or the result may be replaced with an error message.Pixmap bitmap (in) Bitmap to use for generating Post-
script.int x (in) X-coordinate within bitmap of left
edge of region to output.int y (in) Y-coordinate within bitmap of top
edge of region to output.int width (in) Width of region of bitmap to out-
put, in pixels.int height (in) Height of region of bitmap to out-
put, in pixels. XColor *colorPtr (in) Information about color value to set in Postscript. TkFont tkFont (in) Font for which Postscript is to be generated. double *coordPtr (in) Pointer to an array of coordinates for one or more points specified in canvas coordinates. The order of values in coordPtr is x1, y1, x2, y2, x3, y3, and so on. int numPoints (in) Number of points at coordPtr.DESCRIPTION
These procedures are called by canvas type managers to carry out common functions related to generating Postscript. Most of the procedurestake a canvas argument, which refers to a canvas widget for which Post-
script is being generated.TTkkCCaannvvaassPPssYY takes as argument a y-coordinate in the space of a canvas
and returns the value that should be used for that point in the Post-
script currently being generated for canvas. Y coordinates requiretransformation because Postscript uses an origin at the lower-left cor-
ner whereas X uses an origin at the upper-left corner. Canvas x coor-
dinates can be used directly in Postscript without transformation.TTkkCCaannvvaassPPssBBiittmmaapp generates Postscript to describe a region of a bit-
map. The Postscript is generated in proper image data format for Post-
script, i.e., as data between angle brackets, one bit per pixel. ThePostscript is appended to interp->result and TCLOK is returned unless
an error occurs, in which case TCLERROR is returned and interp->result
is overwritten with an error message.TTkkCCaannvvaassPPssCCoolloorr generates Postscript to set the current color to cor-
respond to its colorPtr argument, taking into account any color map specified in the ppoossttssccrriipptt command. It appends the Postscript tointerp->result and returns TCLOK unless an error occurs, in which case
TCLERROR is returned and interp->result is overwritten with an error
message. TTkkCCaannvvaassPPssFFoonntt generates Postscript that sets the current font to match tkFont as closely as possible. TTkkCCaannvvaassPPssFFoonntt takes into account any font map specified in the ppoossttssccrriipptt command, and it does the best it can at mapping X fonts to Postscript fonts. It appends thePostscript to interp->result and returns TCLOK unless an error occurs,
in which case TCLERROR is returned and interp->result is overwritten
with an error message. TTkkCCaannvvaassPPssPPaatthh generates Postscript to set the current path to the set of points given by coordPtr and numPoints. It appends the resultingPostscript to interp->result.
TTkkCCaannvvaassPPssSSttiippppllee generates Postscript that will fill the current path in stippled fashion. It uses bitmap as the stipple pattern and the current Postscript color; ones in the stipple bitmap are drawn in the current color, and zeroes are not drawn at all. The Postscript isappended to interp->result and TCLOK is returned, unless an error
occurs, in which case TCLERROR is returned and interp->result is over-
written with an error message. KKEEYYWWOORRDDSS bitmap, canvas, color, font, path, Postscript, stipple Tk 4.0 TkCanvasPs(3)