#include <openbabel/depict/painter.h>
|
virtual | ~OBPainter () |
|
virtual void | NewCanvas (double width, double height)=0 |
|
virtual bool | IsGood () const =0 |
|
virtual void | SetFontFamily (const std::string &fontFamily)=0 |
|
virtual void | SetFontSize (int pointSize)=0 |
|
virtual void | SetFillColor (const OBColor &color)=0 |
|
virtual void | SetFillRadial (const OBColor &start, const OBColor &end)=0 |
|
virtual void | SetPenColor (const OBColor &color)=0 |
|
virtual void | SetPenWidth (double width)=0 |
|
virtual double | GetPenWidth ()=0 |
|
virtual void | DrawLine (double x1, double y1, double x2, double y2, const std::vector< double > &dashes=std::vector< double >())=0 |
|
virtual void | DrawCircle (double x, double y, double r)=0 |
|
virtual void | DrawPolygon (const std::vector< std::pair< double, double > > &points)=0 |
|
virtual void | DrawBall (double x, double y, double r, double opacity=1.0)=0 |
|
virtual void | DrawText (double x, double y, const std::string &text)=0 |
|
virtual OBFontMetrics | GetFontMetrics (const std::string &text)=0 |
|
Abstract painter base class used by OBDepict.
- Since
- version 2.3
◆ ~OBPainter()
Virtual destructor to be inhereted by subclasses
◆ NewCanvas()
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.
Implemented in ASCIIPainter, CommandPainter, and CairoPainter.
◆ IsGood()
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.
Implemented in ASCIIPainter, CommandPainter, and CairoPainter.
◆ SetFontFamily()
virtual void SetFontFamily |
( |
const std::string & |
fontFamily | ) |
|
|
pure virtual |
◆ SetFontSize()
virtual void SetFontSize |
( |
int |
pointSize | ) |
|
|
pure virtual |
◆ SetFillColor()
virtual void SetFillColor |
( |
const OBColor & |
color | ) |
|
|
pure virtual |
◆ SetFillRadial()
virtual void SetFillRadial |
( |
const OBColor & |
start, |
|
|
const OBColor & |
end |
|
) |
| |
|
pure virtual |
◆ SetPenColor()
virtual void SetPenColor |
( |
const OBColor & |
color | ) |
|
|
pure virtual |
◆ SetPenWidth()
virtual void SetPenWidth |
( |
double |
width | ) |
|
|
pure virtual |
◆ GetPenWidth()
virtual double GetPenWidth |
( |
| ) |
|
|
pure virtual |
◆ DrawLine()
virtual void DrawLine |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
const std::vector< double > & |
dashes = std::vector< double >() |
|
) |
| |
|
pure virtual |
◆ DrawCircle()
virtual void DrawCircle |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
r |
|
) |
| |
|
pure virtual |
◆ DrawPolygon()
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.
Implemented in ASCIIPainter, CommandPainter, and CairoPainter.
◆ DrawBall()
virtual void DrawBall |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
r, |
|
|
double |
opacity = 1.0 |
|
) |
| |
|
pure virtual |
◆ DrawText()
virtual void DrawText |
( |
double |
x, |
|
|
double |
y, |
|
|
const std::string & |
text |
|
) |
| |
|
pure virtual |
◆ GetFontMetrics()
The documentation for this class was generated from the following file: