16#ifndef MOLDRAW2DCAIRO_H
17#define MOLDRAW2DCAIRO_H
33 cairo_reference(dp_cr);
34 df_noFreetype = noFreetype;
35 initTextDrawer(noFreetype);
44 initTextDrawer(noFreetype);
45 df_noFreetype = noFreetype;
53 if (cairo_get_reference_count(dp_cr) > 0) {
68 bool rawCoords =
false)
override;
71 bool rawCoords =
false)
override;
76 unsigned int nSegments = 16,
double vertOffset = 0.05,
77 bool rawCoords =
false)
override;
84#if defined(WIN32) && !defined(RDK_BUILD_FREETYPE_SUPPORT)
89 cairo_t *dp_cr =
nullptr;
90 bool df_noFreetype =
false;
92 void updateMetadata(
const ROMol &mol,
int confId)
override;
95 void initDrawing()
override;
96 void initTextDrawer(
bool noFreetype)
override;
97 std::string addMetadataToPNG(
const std::string &png)
const;
98 void updateMetadata(
const ROMol &mol)
const;
This is a class for storing and applying general chemical reactions.
void setColour(const DrawColour &col) override
sets the current draw color
MolDraw2DCairo & operator=(MolDraw2DCairo &&)=delete
void clearDrawing() override
clears the contents of the drawing
MolDraw2DCairo(const MolDraw2DCairo &)=delete
void writeDrawingText(const std::string &fName) const
void drawPolygon(const std::vector< Point2D > &cds, bool rawCoords=false) override
void drawWavyLine(const Point2D &cds1, const Point2D &cds2, const DrawColour &col1, const DrawColour &col2, unsigned int nSegments=16, double vertOffset=0.05, bool rawCoords=false) override
draw a wavy line like that used to indicate unknown stereochemistry
MolDraw2DCairo(int width, int height, int panelWidth=-1, int panelHeight=-1, bool noFreetype=false)
MolDraw2DCairo & operator=(const MolDraw2DCairo &)=delete
std::string getDrawingText() const
MolDraw2DCairo(MolDraw2DCairo &&)=delete
void drawLine(const Point2D &cds1, const Point2D &cds2, bool rawCoords=false) override
MolDraw2DCairo(int width, int height, cairo_t *cr, int panelWidth=-1, int panelHeight=-1, bool noFreetype=false)
int panelHeight() const
return the height of the drawing panels.
MolDraw2D(int width, int height, int panelWidth, int panelHeight)
constructor for a particular size
int height() const
return the height of the drawing area.
virtual bool supportsAnnotations() const
int panelWidth() const
return the width of the drawing panels.
int width() const
return the width of the drawing area.
#define RDKIT_MOLDRAW2D_EXPORT