1.7.5 Caution on Clipping Tone Patterns

The tone patterns in the DCL normally (if not clipped) fill a polygon even when the specified boundaries of the polygons overlap. More precisely, soft fill is performed following the Even Odd Rule and hard fill is machine-dependent, but even the hard fills are made so as to follow the rules of soft fills as much as possible.

In earlier versions, clippings could not be made on a hard fill, but from DCL ver.5, clippings can be made on hard fill in a way similar to a soft fill. In other words, the clipping of the tone pattern is not performed by the hardware. Instead, boundary points specifying the overlap in the specified region and the clipping range are generated, and the data are handed over to the tone routine. The algorithm for calculating this clipped boundary line runs on the precondition that the direction of the boundary line is known. Here, the direction of the boundary line is the clockwise or counter-clockwise direction in which the sequence of points defining the boundary is specified. Although this algorithm has poor compatibility with traditional rules for fill tone patterns, it was created nonetheless since the direction of the boundary line on the map (TC) must be provided to determine the outside and inside of the boundary.

The actual procedure of tone clipping is as follows.

1.
The boundary line is clipped and divided into several line segments.
2.
The segmented lines are reconnected to form a closed boundary. When IRMODE=0, the line segments are connected in the counter-clockwise direction; when IRMODE=1, in the clockwise direction.
3.
The generated boundary line is filled in following traditional rules.
The traditional rules are applied to regions which had not been clipped, and IRMODE holds no meaning. This means that the exterior of the boundary line cannot be filled by specifying some appropriate IRMODE .

Therefore, it is dangerous to perform clipping when filling in a polygon with overlapping boundaries. To be on the safe side, the user is advised to

set the direction of the boundary lines and use smaller, simpler polygons
when clipping.

When you wish to fill the outside of a polygon, divide the area into 2 sections so that the polygon will definitely be be clipped, reset the clipping area (viewport), and call the tone routine twice.