TEllipse Class Reference

class TEllipse

Member Functions Documentation

Construct(const TRect &)

IMPORT_C void Construct ( const TRect & aRect )

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

Intersection(const TRect &, const TPoint &)

IMPORT_C TPoint Intersection ( const TRect & aRect,
const TPoint & aPoint
)

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.

NextStep(TPoint &, TPoint &, TPoint &, TPoint &)

IMPORT_C TBool NextStep ( TPoint & aTopLeft,
TPoint & aTopRight,
TPoint & aBottomLeft,
TPoint & aBottomRight
)

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

Output(TPoint &, TPoint &, TPoint &, TPoint &)

IMPORT_C TBool Output ( TPoint & aTopLeft,
TPoint & aTopRight,
TPoint & aBottomLeft,
TPoint & aBottomRight
) [protected]

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.

SingleStep(TPoint &, TPoint &, TPoint &, TPoint &)

IMPORT_C TBool SingleStep ( TPoint & aTopLeft,
TPoint & aTopRight,
TPoint & aBottomLeft,
TPoint & aBottomRight
)

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

Member Enumerations Documentation

Enum TEllipseStatus

Enumeration for the ellipse production life cycle

Enumerators

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

Member Data Documentation

TInt iA

TInt iA [protected]

TInt64 iASquBSqu

TInt64 iASquBSqu [protected]

TInt64 iASquared

TInt64 iASquared [protected]

TInt iB

TInt iB [protected]

TInt64 iBSquared

TInt64 iBSquared [protected]

TInt64 iD1

TInt64 iD1 [protected]

TInt64 iD2

TInt64 iD2 [protected]

TPoint iOffset

TPoint iOffset [protected]

TEllipseStatus iStatus

TEllipseStatus iStatus [protected]

TInt iX

TInt iX [protected]

TInt iXAdj

TInt iXAdj [protected]

TInt iY

TInt iY [protected]

TInt iYAdj

TInt iYAdj [protected]