|
| AntiAliasedDrawing (gm::Context &context, DrawingType drawingType) |
| Create an anti-aliased drawing context with a given width and colour. More...
|
|
void | setWidthColor (gm::Context &context, int width, color::RGBA rgba, Size &widgetSize) |
| Set the width and colour of a line to be drawn. More...
|
|
void | setColor (gm::Context &context, color::RGBA rgba, Size &widgetSize) |
| Set the colour of the line to be drawn. More...
|
|
void | drawLine (gm::Context &context, Position< float > p0, Position< float > p1, int interiorWidth=0) |
| Implement a modified Xiaolin Wu anti aliasing algorithm. More...
|
|
template<typename T > |
bool | renderLine (gm::Context &context, Position< T > p0, Position< T > p1) |
| Draw an anti-aliased line. More...
|
|
◆ DrawingType
The drawing style used by the drawing engine.
Enumerator |
---|
SimpleLine | Simple lines, no anti-aliasing.
|
AntiAliased | Modified Wu's algorithm anti-aliaseing.
|
◆ AntiAliasedDrawing()
Create an anti-aliased drawing context with a given width and colour.
- Parameters
-
context | The graphics context to use. |
width | The width of the line in pixels. |
rgba | The line colour RGBA. |
◆ drawLine()
Implement a modified Xiaolin Wu anti aliasing algorithm.
Implements the Xiaolin Wu anti aliased line algorithm but inserts interiorWidth stuffing pixels between the two controlled brightness pixes. When interiorWidth is 0 the normal Wu algorithm is used.
- Parameters
-
context | The Graphics Context used to draw. |
p0 | The starting point for the line. |
p1 | The ending point for the line. |
interiorWidth | Stuffing width of the line. |
◆ renderLine()
Draw an anti-aliased line.
- Parameters
-
context | The graphics context to use. |
p0 | The start point. |
p1 | The end point. |
- Returns
- True if the rendering operation returned success.
◆ setColor()
Set the colour of the line to be drawn.
- Parameters
-
context | The graphics context to use. |
rgba | The line colour RGBA. |
◆ setWidthColor()
Set the width and colour of a line to be drawn.
- Parameters
-
context | The graphics context to use. |
width | The width of the line in pixels. |
rgba | The line colour RGBA. |
The documentation for this class was generated from the following files: