 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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) {
68 unsigned int nSegments = 16,
double vertOffset = 0.05)
override;
73 double &label_height)
const override;
81 bool supportsAnnotations()
override {
93 #endif // MOLDRAW2DCAIRO_H
#define RDKIT_MOLDRAW2D_EXPORT
void drawChar(char c, const Point2D &cds) override
void drawLine(const Point2D &cds1, const Point2D &cds2) override
draws a line from cds1 to cds2 using the current drawing style
void clearDrawing() override
clears the contents of the drawing
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)
void setColour(const DrawColour &col) override
sets the current draw color
void drawPolygon(const std::vector< Point2D > &cds) override
void getStringSize(const std::string &label, double &label_width, double &label_height) const override
MolDraw2D is the base class for doing 2D renderings of molecules.
void writeDrawingText(const std::string &fName) const
void drawWavyLine(const Point2D &cds1, const Point2D &cds2, const DrawColour &col1, const DrawColour &col2, unsigned int nSegments=16, double vertOffset=0.05) override
draw a wavy line like that used to indicate unknown stereochemistry
std::string getDrawingText() const