Line Style Routines


Linestyles are specified by giving a nominal length of a single dash and a character string consisting of 1's and 0's (zeros) that specify when to draw a dash and when not to draw a dash. Linestyles will follow curves and "go around" corners. If a linestyle is set or reset, the accumulated information as to where on a curve (or line) a dash is to be draw is also reset.

For example, with a nominal view of -1 to 1, setting the dash length to 0.5, and the linestyle to '11010' would draw a line(or curve) with a 1.0 unit solid part, followed by a 0.5 unit blank part followed by a 0.5 unit solid part followed by a 0.5 unit blank part. The linestyle would then repeat itself.

The dash sizes are affected by the current viewport/transformation scaling factors, meaning that in perspective, the dashes look smaller the farther away they are.


linewidth(rasters)

Set the current line width in units of 1/10,000 of the X size of the display surface

   Fortran:
        subroutine linewidth(iwidth)
        integer iwidth

   C:
        linewidth(iwidth)
             int     iwidth;

   Pascal:
        procedure LineWidth(iwidth: integer)
linewidth

dashcode(dashlen)

Set the current dash length (in world units) to be dashlen.

   Fortran:
        subroutine dashcode(dashlen)
        real dashlen

   C:
        dashcode(dashlen)
             float     dashlen;

   Pascal:
        procedure DashCode(dashlen: real)
dashcode

The sample graphic shows a line segment being drawn using the same linestyle except the dashcode is being changed. Note that the dashcode is in world units,


linestyle(style)

Set the current linestyle to style. Linestyles are specified by giving a nominal length of a single dash and a character string consisting of 1's and 0's (zeros) that specify when to draw a dash and when not to draw a dash. "1" is for a dash , "0" is for a gap. Linestyles will follow curves and "go around" corners.

To reset to a solid line style, enter a linestyle of "". If a linestyle is set or reset, the accumulated information as to where on a curve (or line) a dash is to be draw is also reset.

   Fortran:
        subroutine linestyle(style)
        character *(*) style

   C:
        linestyle(style)
             char *style;

   Pascal:
        procedure LineStyle(style: string_t)

linestyle