[Previous] [Up] [Next]
Go backward to Stroke and fill colors
Go up to General Concepts
Go forward to Zoom and pan

Line style, line width, and arrows

The line style field permits setting the line style (solid line, dashed, dotted etc.) as well as the width of lines. It has effect for the boundaries of polygons (and polygonal lines), splines, circles and ellipses, rectangles and circular arcs. It does not effect text or marks.

Line width is given in Postscript points (1/72 inch). A good value is something around 0.4 or 0.6. The line width can be set to zero to get the thinnest line the device can produce (i.e. approximately the same as 0.15 for a 600 dpi printer or 0.3 for a 300 dpi printer). The Postscript authorities discourage using this feature, since it makes your Postscript files device-dependent.

You can again specify the set of available line styles in the X resources.

The line style can be set in the first little box in the line style field. The display probably requires some explanation. Except for the predefined standard style solid, line styles are represented as a 16 bit integer, shown in hexadecimal. A line style must have a period of 16 points, and is specified as the 16 bit integer whose bits, read from right to left, specify the line style. For instance, a line style with one point on, two points off, two points on, three points off would be displayed as the integer

0001100100011001 = 0x1919.
Again, you can define your own set of line styles in the configuration file.

Furthermore, there are two little buttons in the line style field that allow you to set the current arrow mode. Only polygonal lines, splines, and circular arcs can have arrows. The size of arrows is determined using a slider in the configuration panel.

Arrows are by default drawn as black triangles in the Postscript output. Note that they extend beyond the endpoint of the line by an amount linear in the line width. If that is a problem, you can duplicate the object, give one copy the arrows and line width zero, and move the endpoints of the other copy slightly so they fall in the interior of the arrows of the first copy. Another fix is to change the definition of arrows. If you put the following code in your Postscript preamble, arrows on polylines will never extend beyond the endpoints, even for very fat lines. It has no effect for arrows on splines or arcs.

  /at {smallarrow lt} bind def
  /af {smallarrow mt} bind def

[Previous] [Up] [Next]