#include <cairopainter.h>

Public Member Functions | |
| CairoPainter () | |
| ~CairoPainter () | |
OBPainter methods | |
| void | NewCanvas (double width, double height) |
| bool | IsGood () const |
| void | SetFontFamily (const std::string &fontFamily) |
| void | SetFontSize (int pointSize) |
| void | SetFillColor (const OBColor &color) |
| void | SetPenColor (const OBColor &color) |
| void | SetPenWidth (double width) |
| void | DrawLine (double x1, double y1, double x2, double y2) |
| void | DrawPolygon (const std::vector< std::pair< double, double > > &points) |
| void | DrawCircle (double x, double y, double r) |
| void | DrawText (double x, double y, const std::string &text) |
| OBFontMetrics | GetFontMetrics (const std::string &text) |
CairoPainter specific | |
| void | WriteImage (const std::string &filename) |
| void | WriteImage (std::ostream &ofs, int newWidth=300, int newHeight=300) |
| CairoPainter | ( | ) |
| ~CairoPainter | ( | ) |
| void NewCanvas | ( | double | width, |
| double | height | ||
| ) | [virtual] |
| bool IsGood | ( | ) | const [virtual] |
| void SetFontFamily | ( | const std::string & | fontFamily | ) | [inline, virtual] |
Set the painter's font family.
Implements OBPainter.
| void SetFontSize | ( | int | pointSize | ) | [virtual] |
Set the painter's font point size.
Implements OBPainter.
| void SetFillColor | ( | const OBColor & | color | ) | [virtual] |
Set the painter's fill color.
Implements OBPainter.
| void SetPenColor | ( | const OBColor & | color | ) | [virtual] |
Set the painter's pen color.
Implements OBPainter.
| void SetPenWidth | ( | double | width | ) | [virtual] |
Set the painter's pen width.
Implements OBPainter.
| void DrawLine | ( | double | x1, |
| double | y1, | ||
| double | x2, | ||
| double | y2 | ||
| ) | [virtual] |
Draw a line from x1, y1 to x2, y2. The line is drawn using the current pen color and width.
Implements OBPainter.
| void DrawPolygon | ( | const std::vector< std::pair< double, double > > & | points | ) | [virtual] |
Draw a polygon by connecting consecutive points. The last point will be connected to the first one. The lines are drawn using the current pen color and width. The area inside the polygon is filled with the current fill color.
Implements OBPainter.
| void DrawCircle | ( | double | x, |
| double | y, | ||
| double | r | ||
| ) | [virtual] |
Implements OBPainter.
| void DrawText | ( | double | x, |
| double | y, | ||
| const std::string & | text | ||
| ) | [virtual] |
Implements OBPainter.
| OBFontMetrics GetFontMetrics | ( | const std::string & | text | ) | [virtual] |
Implements OBPainter.
| void WriteImage | ( | const std::string & | filename | ) |
| void WriteImage | ( | std::ostream & | ofs, |
| int | newWidth = 300, |
||
| int | newHeight = 300 |
||
| ) |