class TLinearDDA |
Linear digital differential analyser.
This is used to calculate the pixels which most closely approximate a specified straight line, or when scaling a bitmap. Note that a line is infinitely thin, and can only be approximated by pixels with real width and height.
Functions are provided for: pixel line traversing; jumping to a rectangle or co-ordinate
Public Member Functions | |
---|---|
TLinearDDA() | |
TLinearDDA(const TLinearDDA &) | |
IMPORT_C void | Construct(const TPoint &, const TPoint &, TLineMode) |
IMPORT_C void | JumpToRect(const TRect &) |
IMPORT_C void | JumpToXCoord(const TInt, TInt &) |
IMPORT_C void | JumpToXCoord2(TInt, TInt &) |
IMPORT_C void | JumpToYCoord(TInt &, const TInt) |
IMPORT_C void | JumpToYCoord2(TInt &, TInt) |
IMPORT_C TBool | NextStep(TPoint &) |
IMPORT_C TBool | SingleScanline(TPoint &, TPoint &) |
IMPORT_C TBool | SingleStep(TPoint &) |
Private Member Functions | |
---|---|
void | UpdatePosition() |
Public Member Enumerations | |
---|---|
enum | TLineMode { ECenter, ELeft } |
Private Member Enumerations | |
---|---|
enum | TLineStatus { EInitialised, ECurrent, EComplete } |
IMPORT_C | TLinearDDA | ( | const TLinearDDA & | aLine | ) |
const TLinearDDA & aLine |
IMPORT_C void | Construct | ( | const TPoint & | aStart, |
const TPoint & | aFinish, | |||
TLineMode | aMode = ECenter | |||
) |
IMPORT_C TBool | SingleScanline | ( | TPoint & | aStartPosition, |
TPoint & | aEndPosition | |||
) |
LDDA Line mode.
ECenter |
Centres scan-lines in the pixel line |
ELeft |
Starts at the beginning of a complete scan line. Used for bitmap scaling. |