Clipping Rectangle - Kyocera TASKalfa 3051ci Technical Reference Manual

Prescribe commands
Hide thumbs Also See for TASKalfa 3051ci:
Table of Contents

Advertisement

Chapter 2 Graphics Tutorial

Clipping Rectangle

2-32
With 1 specified for the rule parameter of FILL, the method for determining whether a
point is inside the path involves drawing a ray from that point in any direction and count-
ing the number of times the ray crosses segments of the path. The point is said to be
inside the path if the result is an odd number; if the result is an even number, the point is
said to be outside the path.
The non-zero winding rule also draws a ray from a point in any direction to determine
whether or not that point is inside the path and examines the points where a segment of
the path crosses the ray. However, it then starts counting from zero and adds one each
time a segment in the path crosses the ray from left to right; and subtracts one each time
a segment in the path crosses the ray from right to left. If the result of counting all the
crossings is zero, the point is said to be outside; otherwise the point is said to be inside
the path.
After filling the current path, the FILL command clears the path in the same manner as
NEWP.
Up to this point, we have discussed graphics objects to be drawn or stroked or filled as
paths. However, another PRESCRIBE command can be used to define a clipping tem-
plate for clipping texts, paths, and raster graphics. For this purpose, the CLPR (CLiP
Rectangular region) command is provided to define the rectangular region for clipping
paths.
When the printing system is turned on or reset with PRESCRIBE's RES command, the
clipping rectangle is identical to the printable limits of the page. Subsequently, executing
the CLPR command reduces the clipping rectangle to the intersection of the objects on
the page and the rectangle defined by CLPR.
The following is an example of CLPR.
!R! RES; UNIT C;
NEWP;
SPD 1;
PMRA 6, 9, 3, 0;
PARC 6, 9, 3, 0, 360;
CLPR 3, 6, 9, 12;
STRK;
EXIT;
In this example, lines 1 through 5 draw a circle with an extra line thickness at the coordi-
nates defined by the PMRA command.
The CLPR command on line 6 constructs a rectangle with its left-upper corner posi-
tioned at coordinates 3, 6 and its right-bottom corner positioned at coordinates 9, 12
(both measured from the top and left edge limits of the page).
As with the rectangular area clipping, those parts of the circle that lie outside of the clip-
ping rectangle are erased when the path is stroked, producing the result as shown in the
figure on the next page.
The rectangle defined by CLPR does not clip the graphics objects which are drawn by
the standard mode graphics commands.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents