#include <cairopainter.h>
|
| CairoPainter () |
|
| ~CairoPainter () |
|
|
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 | SetFillRadial (const OBColor &start, const OBColor &end) |
|
void | SetPenColor (const OBColor &color) |
|
void | SetPenWidth (double width) |
|
double | GetPenWidth () |
|
void | DrawLine (double x1, double y1, double x2, double y2, const std::vector< double > &dashes=std::vector< double >()) |
|
void | DrawPolygon (const std::vector< std::pair< double, double > > &points) |
|
void | DrawCircle (double x, double y, double r) |
|
void | DrawBall (double x, double y, double r, double opacity) |
|
void | DrawText (double x, double y, const std::string &text) |
|
OBFontMetrics | GetFontMetrics (const std::string &text) |
|
|
void | WriteImage (const std::string &filename) |
|
void | WriteImage (std::ostream &ofs) |
|
void | SetWidth (int width) |
|
void | SetHeight (int height) |
|
void | SetTitle (std::string title) |
|
void | SetIndex (int index) |
|
void | SetTableSize (int nrows, int ncols) |
|
void | SetBackground (std::string color) |
|
void | SetBondColor (std::string color) |
|
void | SetTransparent (bool tr) |
|
void | SetCropping (bool cr) |
|
◆ CairoPainter()
◆ ~CairoPainter()
◆ NewCanvas()
void NewCanvas |
( |
double |
width, |
|
|
double |
height |
|
) |
| |
|
virtual |
Create a new canvas to paint on with size width
x height
. OBDepict will always call NewCanvas before performing any drawing operations. Painters that are capable of drawing on a previously unspecified area don't need to implement this.
Implements OBPainter.
◆ IsGood()
Before OBDepict performes any drawing operation, this method is called to check if the painter is ready to start drawing. If this method returns false, drawing is aborted.
Implements OBPainter.
◆ SetFontFamily()
void SetFontFamily |
( |
const std::string & |
fontFamily | ) |
|
|
inlinevirtual |
Set the painter's font family.
Implements OBPainter.
◆ SetFontSize()
void SetFontSize |
( |
int |
pointSize | ) |
|
|
virtual |
◆ SetFillColor()
void SetFillColor |
( |
const OBColor & |
color | ) |
|
|
virtual |
◆ SetFillRadial()
◆ SetPenColor()
void SetPenColor |
( |
const OBColor & |
color | ) |
|
|
virtual |
◆ SetPenWidth()
void SetPenWidth |
( |
double |
width | ) |
|
|
virtual |
◆ GetPenWidth()
◆ DrawLine()
void DrawLine |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
const std::vector< double > & |
dashes = std::vector< double >() |
|
) |
| |
|
virtual |
◆ DrawPolygon()
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.
Referenced by CairoPainter::SetFontFamily().
◆ DrawCircle()
void DrawCircle |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
r |
|
) |
| |
|
virtual |
◆ DrawBall()
void DrawBall |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
r, |
|
|
double |
opacity |
|
) |
| |
|
virtual |
◆ DrawText()
void DrawText |
( |
double |
x, |
|
|
double |
y, |
|
|
const std::string & |
text |
|
) |
| |
|
virtual |
◆ GetFontMetrics()
◆ WriteImage() [1/2]
void WriteImage |
( |
const std::string & |
filename | ) |
|
◆ WriteImage() [2/2]
void WriteImage |
( |
std::ostream & |
ofs | ) |
|
◆ SetWidth()
void SetWidth |
( |
int |
width | ) |
|
|
inline |
◆ SetHeight()
void SetHeight |
( |
int |
height | ) |
|
|
inline |
◆ SetTitle()
void SetTitle |
( |
std::string |
title | ) |
|
|
inline |
◆ SetIndex()
void SetIndex |
( |
int |
index | ) |
|
|
inline |
◆ SetTableSize()
void SetTableSize |
( |
int |
nrows, |
|
|
int |
ncols |
|
) |
| |
|
inline |
◆ SetBackground()
void SetBackground |
( |
std::string |
color | ) |
|
|
inline |
◆ SetBondColor()
void SetBondColor |
( |
std::string |
color | ) |
|
|
inline |
◆ SetTransparent()
void SetTransparent |
( |
bool |
tr | ) |
|
|
inline |
◆ SetCropping()
void SetCropping |
( |
bool |
cr | ) |
|
|
inline |
The documentation for this class was generated from the following files: