IGEllipse2D
- IGEllipse2D is a vertically or horizontally oriented ellipse defined by an axis-aligned rectangle (an IGRect2D).
The ellipse is inscribed in the rectangle so it just touches at the midpoint of each edge of the
rectangle. An IGEllipse2D is area enclosing geometry that may be filled and/or framed.
IGEllipse2D - Member Functions and Data by Group
Constructors & Destructor
Use the functions in this group to construct and destroy an object of class IGEllipse2D.
- ~IGEllipse2D
public:
~IGEllipse2D()
- Destroys the ellipse object.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- IGEllipse2D
- Constructs an ellipse object of class IGEllipse2D.
Overload 1
- Creates an ellipse geometry with a uniform radius (a circle) whose center is at the specified location.
public:
IGEllipse2D(const IGPoint2D& center, GCoordinate radius)
- center
- The location of the coordinate system to place the center of the circle.
- radius
- The radius of the circle.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Overload 2
- Creates an ellipse geometry with the specified values.
public:
IGEllipse2D( const IGPoint2D& center,
GCoordinate Xradius,
GCoordinate Yradius )
- Use this constructor to create an ellipse geometry with the
specified horizontal and vertical radii, and whose center is at the specified location.
- center
- The location of the coordinate system to place the center of the ellipse.
- Xradius
- The horizontal radius of the ellipse.
- Yradius
- The vertical radius of the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Overload 3
- Creates an ellipse geometry to fit within the provided rectangle.
public:
IGEllipse2D(const IGRect2D& r)
- Use this constructor to create an ellipse geometry to fit within the given rectangle. If the rectangle is a square, the ellipse is a circle.
- r
- The rectangle within which to construct the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Overload 4
- Copy constructor.
public:
IGEllipse2D(const IGEllipse2D&)
- Use this constructor to create an ellipse object that is copied from the given one.
- const IGEllipse2D&
- The ellipse to be copied.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Overload 5
- Creates an ellipse centered at the origin with zero radius.
public:
IGEllipse2D()
- Use this constructor to creates an ellipse object centered at the origin with zero radius.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Assignment Operator
Use this function to assign the given ellipse.
- operator =
public:
IGEllipse2D& operator =(const IGEllipse2D& Src)
- Assignment operator.
- Src
- The ellipse to be copied.
- Return
- A non-const reference to the left-hand side object.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Obtaining Information About the Ellipse
Use the functions in this group to obtain information about the ellipse such as its bounding rectangle, its center
point, whether it contains a given point, and whether it intersects a given rectangle.
- bounds
public:
IGRect2D bounds() const
- Returns the bounding rectangle of the ellipse.
- Return
- The rectangle that completely encloses the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- center
public:
IGPoint2D center() const
- Returns the center point of the ellipse.
- Return
- An IGPoint2D whose contents indicate the (x, y) coordinate of the center of the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- contains
public:
bool contains(const IGPoint2D& point) const
- Tests whether the ellipse contains the given point.
- point
- The point to test for within the ellipse.
- Return
- TRUE if the ellipse contains the given point.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- intersects
public:
bool intersects(const IGRect2D& rect) const
- Tests whether the ellipse intersects the given rectangle.
- rect
- The rectangle to test for intersection.
- Return
- True if the ellipse intersects the given rectangle.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- size
public:
IGPoint2D size() const
- Returns the ellipse's height and width.
- Return
- An IGPoint2D whose fX value contains the ellipse's width and whose fY value contains the ellipse's height.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Setting the Bounds, Size, and Center for the Ellipse
Use the functions in this group to set the center of the ellipse, its size, and it bounds.
- setBounds
public:
void setBounds(const IGRect2D& bounds)
- Sets the bounding rectangle, which generally changes the ellipse's shape and location.
- bounds
- The new bounding rectangle for the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- setCenter
public:
void setCenter(const IGPoint2D& center)
- Moves the ellipse to be centered on the given point, without changing its radii.
- center
- The new center point for the ellipse.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- setSize
public:
void setSize(const IGPoint2D& size)
- Sets the ellipse's height and width without changing its center point.
- size
- The new size for the ellipse, where width=fX, and height=fY.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Streaming an Area Geometry Object In and Out
Use the functions and operators in this group to stream an ellipse in and out. The functions are readFromStream and
writeToStream. The operators are operator >>= and operator <<=.
- operator <<=
public:
IDataStream& operator <<=(IDataStream&)
- Writes the IGEllipse2D object out to the specified stream.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- operator >>=
public:
IDataStream& operator >>=(IDataStream&) const
- Reads the IGEllipse2D object in from the stream.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- readFromStream
public:
void readFromStream(IDataStream& toWhere)
- Streams in the ellipse object using the given stream defined for polymorphic streaming.
- fromWhere
- The stream for streaming this object in.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- writeToStream
public:
void writeToStream(IDataStream& toWhere) const
- Streams this ellipse object out to the given stream defined for polymorphic streaming.
- toWhere
- The stream for streaming the ellipse object out.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
Testing Two Ellipses for Equality and Inequality
Use the functions in this group to test two ellipses--the given one and the current one--for equality.
- operator !=
public:
bool operator !=(const IGEllipse2D& Src) const
- Tests whether the two ellipses are not equal.
- Src
- The ellipse to be compared to this one.
- Return
- True if the two ellipses are not equal.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
- operator ==
public:
bool operator ==(const IGEllipse2D& Src) const
- Tests whether the two ellipses are equal.
- Src
- The ellipse to be compared to this one.
- Return
- True if the two ellipses are equal.
- Supported Platforms
Windows |
OS/2 |
AIX |
Yes |
Yes |
Yes |
IGEllipse2D - Inherited Member Functions and Data
Inherited Public Functions
Inherited Public Data
Inherited Protected Functions
Inherited Protected Data