Ellipses

The ellipse classes let you implement elliptical shapes that are inscribed inside a bounding rectangle. The bounding rectangle may be passed as a TGRect, as dimensions for a center and radius, or as dimensions for a center, height, and width. The enclosed ellipse touches the midpoint of each edge of the bounding rectangle. When the height and width of the bounding rectangle are equal, the enclosed ellipse is a perfect circle. See Chapter 2 for an ellipse example.

TEllipse has an internal matrix for transforming the ellipse without altering the original points of the ellipse. When you call a transformation function on an ellipse, the values are concatenated to the matrix. GetSize and GetCenter return the original, untransformed ellipse values. Pass these values to the matrix returned by GetMatrix to find the correct values for the center and size.

TEllipse GetCenter GetSize GetMatrix
TGEllipse SetCenter SetBounds SetSize


[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