»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Graphics BITGDI »
TEllipse
Location:
BITSTD.H
Link against: bitgdi.lib
class TEllipse;
Description
Members
Defined in TEllipse
:
Construct()
, EComplete
, EFirstSector
, EInitialised
, ELine
, ESecondSector
, Intersection()
, NextStep()
, Output()
, SingleStep()
, TEllipseStatus
, iA
, iASquBSqu
, iASquared
, iB
, iBSquared
, iD1
, iD2
, iOffset
, iStatus
, iX
, iXAdj
, iY
, iYAdj
Member functions
IMPORT_C void Construct(const TRect &aRect);
Description
Initialises the values of the ellipse so that it conforms to a rectangle entered as a parameter.
Parameters
const TRect &aRect |
the rectangle within which the ellipse is drawn
|
|
IMPORT_C TBool SingleStep(TPoint &aTopLeft, TPoint &aTopRight, TPoint &aBottomLeft, TPoint &aBottomRight);
Description
Does the next stage in producing an ellipse by taking four points (the corners of the rectangle the ellipse should fill) as
parameters. Updates TEllipse status accordingly and calls Output(aTopLeft,aTopRight,aBottomLeft,aBottomRight)
.
Parameters
TPoint &aTopLeft |
Top left corner of rectangle
|
TPoint &aTopRight |
Top right corner of rectangle
|
TPoint &aBottomLeft |
Bottom left corner of rectangle
|
TPoint &aBottomRight |
Bottom right corner of rectangle
|
|
Return value
TBool
|
TBool ETrue if step completed successfully.
|
|
IMPORT_C TBool NextStep(TPoint &aTopLeft, TPoint &aTopRight, TPoint &aBottomLeft, TPoint &aBottomRight);
Description
By analysing the current state of the ellipse the process is taken to the next appropriate step. If iStatus = EInitialised
only one step will be taken, if the ellipse is already semi constructed then it will be taken to completion. Takes in four
point parameters that defines the rectangle in order to pass to SingleStep(aTopLeft,aTopRight,aBottomLeft,aBottomRight).
Parameters
TPoint &aTopLeft |
Top left corner of rectangle
|
TPoint &aTopRight |
Top right corner of rectangle
|
TPoint &aBottomLeft |
Bottom left corner of rectangle
|
TPoint &aBottomRight |
Bottom right corner of rectangle
|
|
Return value
TBool
|
TBool ETrue if a valid rectangle is produced, else EFalse.
|
|
IMPORT_C TPoint Intersection(const TRect &aRect, const TPoint &aPoint);
Description
Constructs an ellipse from the rectangle which it is given and assesses the points position with regard to the ellipse and
where they intersect.
Parameters
const TRect &aRect |
The rectangle within which the ellipse is drawn.
|
const TPoint &aPoint |
A point to compare with the ellipse to determine if intersection occurs.
|
|
Return value
TPoint
|
TPoint The point is set to the corner which the intersection is nearest to.
|
|
protected: IMPORT_C TBool Output(TPoint &aTopLeft, TPoint &aTopRight, TPoint &aBottomLeft, TPoint &aBottomRight);
Description
Sets the absolute points that define the ellipse as calculated using its iOffset from the origin and using the half width
and half height of the rectangle iA and iB.
Parameters
TPoint &aTopLeft |
The absolute (x,y) position for the top left point.
|
TPoint &aTopRight |
The absolute (x,y) position for the top right point.
|
TPoint &aBottomLeft |
The absolute (x,y) position for the bottom left point.
|
TPoint &aBottomRight |
The absolute (x,y) position for the bottom right point.
|
|
Return value
TBool
|
TBool ETrue if a valid rectangle is produced, else EFalse. Also sets iStatus to EComplete.
|
|
TEllipseStatus
Description
Enumeration for the ellipse production life cycle
EInitialised |
Ellipse has been initialised but has no area
|
EFirstSector |
The ellipse is drawn as two parabolas. These are in two sectors, the top and bottom half of the rectangle. The first sector
means the top parabola has been produced.
|
ESecondSector |
The parabola that occupies the bottom half of the rectangle has been produced.
|
EComplete |
The ellipse is complete
|
ELine |
The ellipse has either a height or width of two units or less and so takes the appearance of a line
|
|
protected: TEllipseStatus iStatus;
Description
protected: TInt iA;
Description
protected: TInt iB;
Description
protected: TInt64 iASquared;
Description
protected: TInt64 iBSquared;
Description
protected: TInt64 iASquBSqu;
Description
protected: TInt iX;
Description
protected: TInt iY;
Description
protected: TInt iXAdj;
Description
protected: TInt iYAdj;
Description
protected: TPoint iOffset;
Description
protected: TInt64 iD1;
Description
protected: TInt64 iD2;
Description