2D areas

The area classes, TArea and TGArea, provide a specification for a Constructive Area Geometry (CAG) so that you can perform Boolean operations on a set of 2D geometry to create an arbitrary shape. The 2D geometries in the area are treated as a single unit, and the shape is precise because the original geometric information is preserved.

CAG has been adapted for 2D from Constructive Solid Geometry (CSG). CSG is a modeling strategy for 3D that combines the half spaces formed by planes, spheres, toroids, and cylinders to form an arbitrary shape through boolean operations.

Areas are often used to define the clipping boundaries of graphics. For example, when one geometry overlaps another geometry, an area can subtract the top geometry from the underlying geometry to represent the remaining visible portion of the underlying geometry.

Figure 60 shows Round rectangle overlapping Regular rectangle. The visible portion of Round rectangle is its shape because nothing is covering any part of it. The visible portion of Regular rectangle is defined by using an area class to subtract Round rectangle from Regular rectangle.


The idea of combining one geometry with another geometry to create an arbitrary shape has many applications. See the heading "Examples" on page 106 for other ways in which areas can be used.

Class architecture
Creating an area
Constructors, operators, and functions
Examples
Advanced topics

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker