Common Desktop Environment: Desktop KornShell User's Guide

Using dtksh to Access X Drawing Functions

dtksh commands include standard Xlib drawing functions to draw lines, points, segments, rectangles, arcs, and polygons. In the standard C programming environment, these functions take a graphics context (GC) as an argument, in addition to the drawing data. In dtksh drawing functions, a collection of GC options are specified in the parameter list to the command.

By default, the drawing commands create a GC that is used for that specific command and then discarded. If the script specifies the -gc option, the name of a graphics context object can be passed to the command. This GC is used in interpreting the command, and the variable is updated with any modifications to the GC performed by the command.

-gc <GC>

<GC> is the name of an environment variable which has not yet been initialized or which has been left holding a graphic context by a previous drawing command. If this option is specified, then it must be the first GC option specified.

-foreground <color>

The foreground color, which may be either the name of a color or a pixel number.

-background <color>

The background color, which may be either the name of a color or a pixel number.

-font <font name>

The name of the font to be used.

-line_width <number>

The line width to be used during drawing.

-function <drawing function>

The drawing function, which can be xor, or, clear, and, copy, noop, nor, nand, set, invert, equiv, andReverse, orReverse, or copyInverted.

-line_style <style>

The line style, which can be any of the following: LineSolid, LineDoubleDash, or LineOnOffDash.