15 #ifndef MOLDRAW2DCAIRO_H 16 #define MOLDRAW2DCAIRO_H 29 MolDraw2D( width , height ) , dp_cr( cr ) {
30 cairo_reference(dp_cr);
34 cairo_surface_t *surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
35 dp_cr = cairo_create(surf);
36 cairo_surface_destroy (surf);
41 if(cairo_get_reference_count(dp_cr)>0){
62 void drawPolygon(
const std::vector<Point2D > &cds );
66 void getStringSize(
const std::string &label ,
double &label_width ,
67 double &label_height )
const;
81 #endif // MOLDRAW2DCAIRO_H void drawChar(char c, const Point2D &cds)
virtual int height() const
std::string getDrawingText() const
boost::tuple< float, float, float > DrawColour
void setFontSize(double new_size)
void getStringSize(const std::string &label, double &label_width, double &label_height) const
Includes a bunch of functionality for handling Atom and Bond queries.
virtual int width() const
void drawPolygon(const std::vector< Point2D > &cds)
MolDraw2DCairo(int width, int height, cairo_t *cr)
void setColour(const DrawColour &col)
MolDraw2DCairo(int width, int height)
void drawLine(const Point2D &cds1, const Point2D &cds2)
void writeDrawingText(const std::string &fName) const