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.