Drawing functions

The drawing functions are direct calls on the YY server, and, in consequence, take a large number of arguments, most of which are not used. For an example of a higher level interface see the turtle module described later in this document.

The op parameter is a flag describing the bitblt operation needed to render the object on the screen. It may take the following values: GCLEAR, GAND, GANDREVERSE, GCOPY, GANDINTEVERTED, GNOOP, GXOR, GOR, GNOR, GEQIV, GINVERT, GORREVERSE, GCOPYINVERTED, GORINVERTED, GNAND or GSET. What these operations achieve is specified in the Xlib manuals. The edge parameter may take the following values: SQUARE-LINE-EDGE, SQUARE-LINE-EDGE-WITHOUT-END, or ROUND-LINE-EDGE, again specified in the X-manuals.

draw-point-xyCompilerterritory x y op colournull Draws a point at the specified (x, y) point using the specified operation and colour.

draw-line-xyCompilerterritory x1 y1 x2 y2 width op edge colour dashnull Draws a line form (x1, y1) to (x2, y2) using the specified width, operation, edge type and colour. The dash parameter is currently ignored.

draw-string-xyCompilerterritory x y op colour font stringnull Writes the string onto the territory at (x, y) using the specified operation and colour. The y coordinate is the baseline of the text.

draw-string-centredCompilerterritory x y op colour font stringnull Draws the string with its centre at (x, y).

draw-filled-rectangle-xyCompilerterritory x y w h op colour source-territorynull

Draws the specified rectangle filled using the colour, and using the source territory as a mask. If this is null, then the territory is simply filled according to the given operation.

draw-circle-xyCompilerterritory x y r width op colour dashnull Draws a circle of radius r centred at (x, y). The other arguments are as draw-rectangle-xy.

draw-filled-circle-xyCompilerterritory x r y op colour source-territorynull Similar to draw-filled-rectangle-xy.

bitblt-xyCompilersrc-territory s-left s-top dest-territory dest-left dest-top width height opnull General-purpose block copier. Copies bits from the source location to the destination an area of the specified width and height. NB: This function is at present unimplemented.