overview.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
About Clipping (1.2)
Using Section  Function Group                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
                               About Clipping
 
This topic describes a graphics process called clipping. You should also be
familiar with the following topics:
 
    Presentation spaces and device contexts
    Coordinate spaces and transformations
    Regions
    Paths
 
Clipping is a process that limits graphic output to a certain region (or to
certain multiple regions) on a display or a page of printer paper. If an
application attempts to draw output outside of the clipping area, MS OS/2
"clips" the output so that it does not appear on the drawing surface of the
output device. (In this topic, the term "clipping area" is used instead of
"clip region," because in MS OS/2, a clip region is a special kind of
clipping area.)
 
Clipping areas can be polygons (closed regions with straight sides), closed
regions with curved sides, or closed regions with straight and curved
sides.
 
An application can define a clipping area in world space, model space, page
space, or device space. (For more information about coordinate spaces, see
the topic Coordinate spaces and transformations.
 
There are four kinds of clipping areas in MS OS/2, each associated with a
particular coordinate space. The following list indicates the coordinate
space associated with each clipping area:
 
Clipping area   Associated coordinate space
────────────────────────────────────────────────────────────────────────────
Clip path       World space
Viewing limit   Model space
Graphics field  Page space
Clip region     Device space
 
If the clip path is a rectangle, it is drawn inclusive/inclusive, which
means that MS OS/2 includes the bottom and leftmost edges of the rectangle
in the clip path as well as the top and rightmost edges. The viewing limit
and the graphics field are also inclusive/inclusive. The clip region is
inclusive/exclusive, which means that MS OS/2 includes the bottom and
leftmost edges but excludes the top and rightmost edges of the rectangle
from the clip region.
 
An application can use a clip path and a viewing limit for retained-drawing
operations. The clip path is the only clipping area that can have curved
sides, while the viewing limit and the graphics field are always
rectangular. The clip region can consist of a single rectangle or any number
of intersecting rectangles.
 
When an application defines clipping areas in several of the coordinate
spaces, the final result is similar to combining all of the areas into a
single area. This single area is defined by the intersection of the areas in
each coordinate space.
 
Before you attempt to transform a clipping area in the world, model, or page
space, remember that the clip path is the only clipping area that your
application can rotate by using one of the rotation transformations. If you
try to rotate the viewing limit or the graphics field, the result will be a
larger rectangle.
 
 
                                      ♦