Abstract painter base class used by OBDepict.
More...
#include <openbabel/depict/painter.h>
List of all members.
Detailed Description
Abstract painter base class used by OBDepict.
- Since:
- version 2.3
Constructor & Destructor Documentation
Virtual destructor to be inhereted by subclasses
Member Function Documentation
virtual void NewCanvas |
( |
double |
width, |
|
|
double |
height |
|
) |
| [pure 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.
virtual bool IsGood |
( |
) |
const [pure virtual] |
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.
virtual void SetFontFamily |
( |
const std::string & |
fontFamily ) |
[pure virtual] |
Set the painter's font family.
virtual void SetFontSize |
( |
int |
pointSize ) |
[pure virtual] |
Set the painter's font point size.
virtual void SetFillColor |
( |
const OBColor & |
color ) |
[pure virtual] |
Set the painter's fill color.
virtual void SetPenColor |
( |
const OBColor & |
color ) |
[pure virtual] |
Set the painter's pen color.
virtual void SetPenWidth |
( |
double |
width ) |
[pure virtual] |
Set the painter's pen width.
virtual void DrawLine |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2 |
|
) |
| [pure virtual] |
Draw a line from x1
, y1
to x2
, y2
. The line is drawn using the current pen color and width.
virtual void DrawCircle |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
r |
|
) |
| [pure virtual] |
virtual void DrawPolygon |
( |
const std::vector< std::pair< double, double > > & |
points ) |
[pure 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.
virtual void DrawText |
( |
double |
x, |
|
|
double |
y, |
|
|
const std::string & |
text |
|
) |
| [pure virtual] |
virtual OBFontMetrics GetFontMetrics |
( |
const std::string & |
text ) |
[pure virtual] |
The documentation for this class was generated from the following file: