Constructors, operators, and functions

The TGArea constructors each take one 2D area geometry, or you can instantiate an empty TGArea and get the allocated area of the view to flush the view with a fill color (see Chapter 2 for an example). Once you instantiate a TGArea, use the TGArea operators and functions to add, subtract, exclusiveor, or intersect one area geometry with another. Figure 63 illustrates the add, subtract, exclusiveor, and intersect operations between two circles.

To get MGraphic behavior, the TGArea is passed to the TArea constructor. If you do not need MGraphic behavior, use the TGArea directly.


Add

This function adds an area to another area.

    void Add( TGArea& anArea );

Subtract

This function subtacts an area from another area.

    void Subtract( const TGAreaa& anArea );

Exclusive or

This function performs an exclusive-or operation on two areas.

    void ExclusiveOr( const TGArea& anArea );

Intersect

This function intersect an area with another area.

    void Intersect( const TGArea& anArea );

[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