Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: BITSTD.H
Link against: bitgdi.lib

Class TEllipse

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


Construct()

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


SingleStep()

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.


NextStep()

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.


Intersection()

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.


Output()

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.

[Top]


Member enumerations


Enum TEllipseStatus

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

[Top]


Member data


iStatus

protected: TEllipseStatus iStatus;

Description


iA

protected: TInt iA;

Description


iB

protected: TInt iB;

Description


iASquared

protected: TInt64 iASquared;

Description


iBSquared

protected: TInt64 iBSquared;

Description


iASquBSqu

protected: TInt64 iASquBSqu;

Description


iX

protected: TInt iX;

Description


iY

protected: TInt iY;

Description


iXAdj

protected: TInt iXAdj;

Description


iYAdj

protected: TInt iYAdj;

Description


iOffset

protected: TPoint iOffset;

Description


iD1

protected: TInt64 iD1;

Description


iD2

protected: TInt64 iD2;

Description