Previous: setpes Up: ../plot79_s.html Next: setpis
SUBROUTINE SETPFI (PINDEX,ANGLE,HATCH)
C$ (Set Polygon Fill Index)
C$ Set the polygon fill index parameters. They are used for
C$ filling polygons subsequently drawn with the polygon
C$ absolute/relative primitives (PGNAx/PGNRx). Polygons are
C$ filled with parallel lines at specified line spacings and a
C$ single fixed angle, and if desired, the filling may be
C$ automatically repeated with the same line spacings but the
C$ angle incremented by 90 degrees to give a cross-hatched
C$ effect.
C$
C$ By additionally specifying alternate line widths,
C$ intensities, styles, and colors, it is possible to
C$ significantly extend the varieties of patterns available.
C$
C$ Eighty-five (85) predefined patterns are available,
C$ corresponding to fill indices 0..84, with overall pattern
C$ intensity increasing with the pattern index. Fill index
C$ values larger than 84 can be used to construct specific
C$ shading patterns.
C$
C$ The line spacings are specified by the digits of the fill
C$ index. The digits taken from left to right represent the
C$ spacing between adjacent lines of the pattern, measured in
C$ steps of 0.002 unit in normalized device coordinate (NDC)
C$ space. When the digits are exhausted, the pattern is
C$ repeated cyclically. Thus, the digits in the fill index
C$ 631 represent the parallel lines with NDC spacings 0.012,
C$ 0.006, 0.002, 0.012, 0.006, 0.002, etc. Zero digits in the
C$ fill index represent zero spacing, and are therefore
C$ ignored. They are nevertheless useful for defining
C$ patterns whose indices would otherwise conflict with the
C$ built-in fill indices.
C$
C$ Fill index 0 corresponds to no polygon filling, and is the
C$ default value established at CORE initialization time. The
C$ other built-in fill indices 1..84 are constructed by
C$ repeating the twelve basic patterns in the following table
C$ seven times, each time halving the line spacing parameter,
C$ d, of the previous group. The value of d for the first
C$ group of twelve is 0.032, so that the closest lines in fill
C$ indices 79..84 (which have spacing d/64, d/128) are 0.00025
C$ NDC unit apart. On typical raster CRT displays, with
C$ resolutions of 512 to 4096 scan lines, this is equal to or
C$ smaller than one pixel in width, giving solid filling.
C$ Because coordinate roundoff to pixel boundaries can result
C$ in blank raster lines or missed pixels in a tight shading
C$ pattern, it is desirable to choose a line spacing which is
C$ about half the raster spacing in order to get solid
C$ filling.
C$
C$ Fill Index Spacing Angle Hatch
C$ ============= ======= ===== =====
C$ 1 d 0 No
C$ 2 d 45 No
C$ 3 d 90 No
C$ 4 d 135 No
C$ 5 d 0 Yes
C$ 6 d 45 Yes
C$ 7 d,d/2 0 No
C$ 8 d,d/2 45 No
C$ 9 d,d/2 90 No
C$ 10 d,d/2 135 No
C$ 11 d,d/2 0 Yes
C$ 12 d,d/2 45 Yes
C$ ============= ======= ===== =====
C$
C$ The subroutine arguments are:
C$
C$ PINDEX..........Polygon style fill index, an INTEGER
C$ value in the range 0..MAXINT. Negative
C$ values are illegal and will generate an
C$ error message with the current polygon
C$ style left unchanged. A 0 index suppresses
C$ polygon filling, and is the default
C$ established at CORE initialization. The
C$ ANGLE and HATCH parameters are recorded
C$ internally but will be ignored for the
C$ built-in patterns with indices 0..84. Note
C$ that trailing zeroes can be appended to a
C$ non-built-in fill index without changing
C$ its interpretation. Thus, for example,
C$ fill indices 507, 570, 5070, 5700, 57000,
C$ etc. would give spacings of 5*0.002 =
C$ 0.010 and 7*0.002 = 0.014 which could not
C$ otherwise be obtained with the index 57
C$ since the latter is used to select a
C$ built-in pattern.
C$
C$ ANGLE...........Angle (in floating-point degrees) of
C$ shading lines measured counterclockwise
C$ from the horizontal axis.
C$
C$ HATCH........... .FALSE. - No cross-hatching
C$ .TRUE. - Cross-hatch polygon by repeating
C$ the pattern at ANGLE+90.0.
C$ (26-JAN-82)