16 #ifndef MOLDRAW2DSVG_H 17 #define MOLDRAW2DSVG_H 30 MolDraw2DSVG(
int width,
int height, std::ostream &os,
int panelWidth = -1,
32 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(os) {
36 MolDraw2DSVG(
int width,
int height,
int panelWidth = -1,
int panelHeight = -1)
37 :
MolDraw2D(width, height, panelWidth, panelHeight), d_os(d_ss) {
44 virtual void setFontSize(
double new_size)
override;
45 virtual void setColour(
const DrawColour &col)
override;
52 virtual void drawLine(
const Point2D &cds1,
const Point2D &cds2)
override;
53 virtual void drawString(
const std::string &str,
const Point2D &cds)
override;
54 virtual void drawPolygon(
const std::vector<Point2D> &cds)
override;
55 virtual void drawEllipse(
const Point2D &cds1,
const Point2D &cds2)
override;
56 virtual void clearDrawing()
override;
58 virtual void drawWavyLine(
const Point2D &cds1,
const Point2D &cds2,
60 unsigned int nSegments = 16,
61 double vertOffset = 0.05)
override;
65 virtual void getStringSize(
const std::string &label,
double &label_width,
66 double &label_height)
const override;
73 void tagAtoms(
const ROMol &mol,
double radius,
74 const std::map<std::string, std::string> &events = {});
76 void addMoleculeMetadata(
const ROMol &mol,
int confId = -1)
const;
77 void addMoleculeMetadata(
const std::vector<ROMol *> &mols,
78 const std::vector<int> confIds = {})
const;
82 std::stringstream d_ss;
83 std::string d_activeClass;
85 virtual void drawChar(
char c,
const Point2D &cds)
override;
89 virtual void drawBond(
90 const ROMol &mol,
const Bond *bond,
int at1_idx,
int at2_idx,
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)
override;
97 #endif // MOLDRAW2DSVG_H
void tagAtoms(const ROMol &mol)
boost::tuple< float, float, float > DrawColour
MolDraw2DSVG(int width, int height, int panelWidth=-1, int panelHeight=-1)
class for representing a bond
MolDraw2D is the base class for doing 2D renderings of molecules.
std::string getDrawingText() const
#define RDKIT_MOLDRAW2D_EXPORT
MolDraw2DSVG(int width, int height, std::ostream &os, int panelWidth=-1, int panelHeight=-1)
virtual void tagAtoms(const ROMol &mol)