GINO Graphics Suite - GINO v9.0  

gDefineBrokenLineStyle

Syntax

[C/C++:]
void gDefineBrokenLineStyle(int brk, GBRKSTY *rep);
[F90:]
subroutine gDefineBrokenLineStyle(brk, rep)

integer, intent(in) :: brk
type (GBRKSTY), intent(in) :: rep

Arguments

brk
Broken line index 1 to 256 only

rep.mode
Line mode (which may be one of the following)

= GSOLID
= GCONTDASH
= GCONTCHAIN
= GDISCONTDASH
= GDISCONTCHAIN

rep.repeat
Repeat length in current units

rep.dash
Dash length in current units

rep.dot
Dot length in current units (for chained lines)

Description

The routine gDefineBrokenLineStyle() allows the user to redefine the line type parameters associated with a specified index brk in the broken line table. There are 256 entries in the table and if brk is outside the range of 1 to 256, an error message is output and no further action is taken.

The new representation is defined in the structure rep which is of type GBRKSTY.

If rep.mode is out of range, a warning message is output and a default value of GSOLID is assumed. If rep.mode is GSOLID, the line type is solid and the values in rep.repeat, rep.dash and rep.dot are ignored. Otherwise these values specify the dimensions in current units of the broken line pattern. If any of rep.repeat, rep.dash or rep.dot is less than zero, a warning message is output and the absolute value is used. If rep.repeat is less than rep.dash for a dashed line type or if rep.repeat is less than rep.dash+rep.dot for a chained line type, a warning message is output and the line type defaults to being solid.

rep.mode also specifies how the broken line pattern is positioned when lines are output. If rep.mode is either GCONTCHAIN or GCONTDASH (continuous line), the pattern carries on from one line to the next. If rep.mode is either GDISCONTCHAIN or GDISCONTDASH (discontinuous line), the pattern is centred along each straight line segment and, if necessary, scaled down so that each line segment starts and ends with an equal length dash.

When a call to gSetBrokenLine() selects a line type in the range 1 to 256, the corresponding line type parameters come into effect. If a call to gDefineBrokenLineStyle() redefines the line type parameters associated with the current line type, i.e. a call to gSetBrokenLine(brk) precedes the call to gDefineBrokenLineStyle(), the new line type parameters immediately come into effect.

If the line type cannot be generated by the device exactly as specified, it will be generated by GINO's software. Appendix B (see Device Drivers) should be consulted to see whether the device can cope with broken line types that are specified in terms of the line type parameters. gSetBrokenLineMode() may be called to force GINO to generate all broken lines, thereby ensuring that they are output correctly on any device.

When a device is nominated the line type parameters are set to the following set of 16 default values repeated throughout the table:

brk              mode           repeat  dash dot style       
1(GSHORTDASHED)  GDISCONTDASH   6.0     4.0  0.0 short dashed
2(GSHORTDOTTED)  GDISCONTDASH   4.0     0.8  0.0 short dotted
3(GSHORTCHAINED) GDISCONTCHAIN 10.0     6.0  1.0 short chained
4(GLONGDASHED)   GDISCONTDASH  12.0     8.0  0.0 long dashed
5(GLONGDOTTED)   GDISCONTDASH   8.0     1.6  0.0 long dotted
6(GLONGDOTTED)   GDISCONTCHAIN 20.0    12.0  2.0 long chained
7(GDOTTED)       GDISCONTDASH   1.5     0.5  0.0 dotted
8                GDISCONTDASH   2.0     1.0  0.0 dotted
9                GDISCONTDASH   3.0     2.0  0.0 dashed
10               GDISCONTDASH   6.0     5.0  0.0 dashed
11               GDISCONTDASH  10.0     8.0  0.0 dashed
12               GDISCONTDASH  15.0    12.0  0.0 dashed
13               GDISCONTCHAIN  6.0     3.0  0.5 chained
14               GDISCONTCHAIN  8.0     5.0  0.5 chained
15               GDISCONTCHAIN 12.0     8.0  0.5 chained
16               GDISCONTCHAIN 16.0    12.0  1.0 chained


See Also

gDefineBrokenLineStyle Usage
gSetBrokenLine
gSwitchBrokenLineStyles