2.9 Explanation of Subroutines: Tone Primitives

This is a group of subroutines for tone primitives, which fill an area inside a closed polygon.



These routines perform hard fill or soft fill according to the capability of the device. When the internal variable 'LSOFTF' (See Section 2.4.4) is .true. soft fill is performed; when .false., hard fill is performed. (The initial value is .false.). However, even when hard fill is selected, soft fill will be performed is the device is not capable of hard fill.

Also, when solid colors are chosen for the fill pattern (tone pattern index with 999 as the last 3 digits), the color index may be converted to pattern indexes such as for dot patterns. When the internal variable 'LCL2TN' (See Section 2.4.4) is .true., the color index is converted; when false, .false., it is not converted. (The initial value is .false.). However, for devices that cannot handle color fills, the color index is converted to pattern index even when 'LCL2TN' is set as .false..

If a soft fill is performed on top of an existing polygon, only the tone pattern is overwritten, and the existing polygon is not erased (Unless solid fill is performed). However, with some devices, an existing polygon drawn by hard fill is erased, so caution is needed in the order the polygons are created when using tone primitives with other output polygons.



In the explanation of the following subroutines, the coordinates of the apexes that define a polygon (PX(i), PY(i)) (i=1,N) (These can be specified in the U/V/R-coordinates) are understood as follows. (PX(1), PY(1)) and (PX(N), PY(N)) do not necessarily have to be the same point. In other words, a closed region formed by connecting (PX(i), PY(i)) and (PX(i+1), PY(i+1)) (i=1,N-1) and (PX(N), PY(N)) and (PX(1), PY(1)) are filled in.



In the group of subroutines supported currently, the length of an array giving the coordinates of a polygon must be less than 256 due to limits of the work area secured internally.