9.1 Summary

The UEPACK is a subroutine package that performs tone fill of 2-D contour graphs. The tone fill is performed in the UC and is compatible with all normalization transformations.

In this package, the tone fill on contours are performed using the tone primitives of "GRPH1." (See user's manual for "GRPH1.") This package only performs the tone fill and does not draw the contours or the frames such as the coordinate axes.



The following are the subroutines for the user in the UDPACK.



Information concerning grid-point coordinates are handled by UWPACK. (See Section 11.)

When you want a quick look at the filled 2-D data, simply call UETONE.  Equidistant grid points will be set to the full extent of the window, and the negative area will be filled with diagonal hatch pattern.



When you wish to set the values of the tone levels as same as those in UDPACK, set the internal variable 'LTONE' handled by UEpGET/UEpSET to .TRUE., and call UETONE.  Then, the tone fill will be performed using the step size generated automatically by the UDPACK (to be more precise, by setting the level values based on the same algorithm as in UDPACK). Furthermore, if UEGTLA  is called in correspondence to UDGCLA and UEGTLB  to UDGCLB, then the values of the contour level and the tone level will be set to have the same value.



If the grid-points are not equidistant, then call UWSGXA (X direction)/UWSGYA (Y direction) before making a call to UETONE to specify the values of the grid-point coordinates beforehand. When you wish to set equidistant grid points in only a certain part of the window, then use  UWSGXB (X direction)/UWSGYB (Y direction) to set the minimum and maximum values for the grid points.



As stated above, if you wish to specify the tone level beforehand, you should call UEGTLA or UEGTLB before UETONE. However, in this case, only tone levels with equal intervals will be generated. If you wish to specify tone levels and patterns at uneven intervals, or if you wish to add a specific tone level and pattern, you should call UESTLV or UESTLN. (To clear all levels, call UEITLV.) Note that the tone fill is performed in the order of specification. To see the tone patterns, see the Appendix for the SGPCAK in GRPH1.



The tone primitives of "GRPH1" used in this package can switch between hard fill and soft fill depending on the capability of the output device. When the internal variable 'LSOFTF'  (see user's manual for "GRPH1") handled by SGpGET/SGpSET is .TRUE., soft fill is performed; when .FALSE., hard fill is performed. (The initial value is .TRUE..) However, even when hard fill is specified, if the output device is incapable of hard fill, then soft fill is performed. The soft fill uses the subroutines of fill area primitives (see section on fill area primitives in "GRPH1.")

When performing solid fills using colors (corresponding to tone pattern numbers with 999 as their last 3 digits), the color index may be  converted into pattern index such as for dot patterns.  When the internal variable 'LCL2TN' (see SGPACK in "GRPH1") handled by SGpGET/SGpSET is .TRUE., then the color index is converted into pattern index; when .FALSE., it is not converted. (The initial value is .FALSE..) However, when outputting to devices incapable of color fills, an attempt will be made to convert the color index into pattern index  even when 'LCL2TN' is .FALSE.



When a soft fill is performed on an existing polygon, only the tone pattern will be overwritten, and the polygon will not be erased (unless solid fill is performed). However, a hard fill may erase existing polygons depending on the output device. So, when using UEPACK with coordinate axes and contour graphs, the order the graphics are drawn will be important. 



Internally, this routine used COMMON blocks named UEBLK1 and UEBLK2. The user must not use an external procedure or a COMMON block with the same name.