#include <bitstd.h>
class CPolygonFiller : public CBase |
Public Member Enumerations | |
---|---|
enum | TUsage { EGetAllPixelRunsSequentially, EGetPixelRunsSequentiallyForSpecifiedScanLines } |
Public Member Functions | |
---|---|
CPolygonFiller() | |
~CPolygonFiller() | |
IMPORT_C void | Construct(const CArrayFix< TPoint > *, CGraphicsContext::TFillRule, TUsage) |
IMPORT_C void | Construct(const TPoint *, TInt, CGraphicsContext::TFillRule, TUsage) |
IMPORT_C void | GetNextPixelRun(TBool &, TInt &, TInt &, TInt &) |
IMPORT_C void | GetNextPixelRunOnSpecifiedScanLine(TBool &, TInt, TInt &, TInt &) |
IMPORT_C void | Reset() |
Describes how pixels are to be displayed in the polygon. aUsage should be select to one of these values before CPolygonFiller::Construct is used.
IMPORT_C | CPolygonFiller | ( | ) |
Constructor which initializes all member data to zero, EFalse or null for TInt, TBool pointers respectively.
IMPORT_C void | Construct | ( | const CArrayFix< TPoint > * | aPointArray, |
CGraphicsContext::TFillRule | aFillRule, | |||
TUsage | aUsage = EGetAllPixelRunsSequentially | |||
) |
An overloaded version of Construct which allows the list of points to be passed in as a point array. Exactly the same behaviour and structure as above. This should not fail. This method does not require the number of nodes to be given as a parameter.
Parameter | Description |
---|---|
aFillRule | How filling should be achieved, as described by a CGraphicsContext::TFillRule object. |
aUsage | How the polygon should be used. |
IMPORT_C void | Construct | ( | const TPoint * | aPointList, |
TInt | aNumPoints, | |||
CGraphicsContext::TFillRule | aFillRule, | |||
TUsage | aUsage = EGetAllPixelRunsSequentially | |||
) |
Takes a list of points to be the points for the new polygon and sets the number of points in the shape. After this has been done it transfers the task to Construct(aFillRule,aUsage). This should not fail.
Parameter | Description |
---|---|
aPointList | A list of points for the polygon. |
aNumPoints | The number of points in the list. |
aFillRule | How filling should be achieved, as described by a CGraphicsContext::TFillRule object. |
aUsage | How the polygon should be used, see TUsage enumeration. |
Method is used to calculate the locations of vertex interactions between the polygon and scan lines. An initial scan line is required. It calculates the start and end positions on the line. The method can use either the fast or slow polygon algorithm depending upon the state of aUsage. Polygon filling is also addressed by this method.
Parameter | Description |
---|---|
aExists | Will be set to false if a polygon with no vertexes is passed in, otherwise ETrue on return. |
aStart | The position on the scan line to start the run, on returned. |
aEnd | The position on the scan line to end the run, returned. |
IMPORT_C void | GetNextPixelRunOnSpecifiedScanLine | ( | TBool & | aExists, |
TInt | aScanLine, | |||
TInt & | aStart, | |||
TInt & | aEnd | |||
) |
Similar to GetNextPixelRun(aExists, aScanLine, aStart, aEnd) this method is used to draw the relevant vertex intersections for a polygon but only for an individual specified scan line. The method can use either the fast or slow polygon algorithm depending upon the state of aUsage.
Parameter | Description |
---|---|
aExists | Will be set to false if the line does not pass through the polygon or if a polygon with no vertices is specified, otherwise ETrue on return. |
aStart | The position on the scan line to start the run, on returned. |
aEnd | The position on the scan line to end the run, returned. |