16 #ifndef MOLDRAW2DSVG_H
17 #define MOLDRAW2DSVG_H
31 MolDraw2DSVG(
int width,
int height, std::ostream &os,
int panelWidth = -1,
32 int panelHeight = -1,
bool noFreetype =
false)
33 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(os) {
35 initTextDrawer(noFreetype);
39 MolDraw2DSVG(
int width,
int height,
int panelWidth = -1,
int panelHeight = -1,
40 bool noFreetype =
false)
41 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(d_ss) {
43 initTextDrawer(noFreetype);
60 unsigned int nSegments = 16,
61 double vertOffset = 0.05)
override;
71 const std::map<std::string, std::string> &events = {});
77 const std::vector<int> confIds = {})
const;
83 std::stringstream d_ss;
84 std::string d_activeClass;
86 void initDrawing()
override;
87 void initTextDrawer(
bool noFreetype)
override;
91 const std::vector<int> *highlight_atoms =
nullptr,
92 const std::map<int, DrawColour> *highlight_atom_map =
nullptr,
93 const std::vector<int> *highlight_bonds =
nullptr,
94 const std::map<int, DrawColour> *highlight_bond_map =
nullptr,
95 const std::vector<std::pair<DrawColour, DrawColour>>
96 *bond_colours =
nullptr)
override;
103 annot.
rect_ = note_rect;
104 drawAnnotation(annot);
class for representing a bond
void setColour(const DrawColour &col) override
sets the current draw color
MolDraw2DSVG(int width, int height, int panelWidth=-1, int panelHeight=-1, bool noFreetype=false)
virtual void outputClasses()
void drawAtomLabel(int atom_num, const DrawColour &draw_colour) override
void clearDrawing() override
clears the contents of the drawing
void tagAtoms(const ROMol &mol) override
void drawAnnotation(const std::string ¬e, const StringRect ¬e_rect) override
DEPRECATED.
void drawBond(const ROMol &mol, const Bond *bond, int at1_idx, int at2_idx, const std::vector< int > *highlight_atoms=nullptr, const std::map< int, DrawColour > *highlight_atom_map=nullptr, const std::vector< int > *highlight_bonds=nullptr, const std::map< int, DrawColour > *highlight_bond_map=nullptr, const std::vector< std::pair< DrawColour, DrawColour >> *bond_colours=nullptr) override
void addMoleculeMetadata(const std::vector< ROMol * > &mols, const std::vector< int > confIds={}) const
MolDraw2DSVG(int width, int height, std::ostream &os, int panelWidth=-1, int panelHeight=-1, bool noFreetype=false)
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
void drawEllipse(const Point2D &cds1, const Point2D &cds2) override
draw an ellipse
void addMoleculeMetadata(const ROMol &mol, int confId=-1) const
void tagAtoms(const ROMol &mol, double radius, const std::map< std::string, std::string > &events={})
void drawAnnotation(const AnnotationType &annot) override
void drawLine(const Point2D &cds1, const Point2D &cds2) override
void drawPolygon(const std::vector< Point2D > &cds) override
std::string getDrawingText() const
MolDraw2D is the base class for doing 2D renderings of molecules.
virtual void tagAtoms(const ROMol &mol)
#define RDKIT_MOLDRAW2D_EXPORT