16 #ifndef MOLDRAW2DCAIRO_H 17 #define MOLDRAW2DCAIRO_H 31 :
MolDraw2D(width, height, panelWidth, panelHeight), dp_cr(cr) {
32 cairo_reference(dp_cr);
37 :
MolDraw2D(width, height, panelWidth, panelHeight) {
38 cairo_surface_t *surf =
39 cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
40 dp_cr = cairo_create(surf);
41 cairo_surface_destroy(surf);
46 if (cairo_get_reference_count(dp_cr) > 0) {
56 void setFontSize(
double new_size);
65 void drawChar(
char c,
const Point2D &cds);
67 void drawPolygon(
const std::vector<Point2D> &cds);
72 unsigned int nSegments = 16,
double vertOffset = 0.05);
76 void getStringSize(
const std::string &label,
double &label_width,
77 double &label_height)
const;
80 std::string getDrawingText()
const;
82 void writeDrawingText(
const std::string &fName)
const;
90 #endif // MOLDRAW2DCAIRO_H
MolDraw2DCairo(int width, int height, int panelWidth=-1, int panelHeight=-1)
MolDraw2DCairo(int width, int height, cairo_t *cr, int panelWidth=-1, int panelHeight=-1)
MolDraw2D is the base class for doing 2D renderings of molecules.
#define RDKIT_MOLDRAW2D_EXPORT
boost::tuple< float, float, float > DrawColour