RDKit::MolDraw2D Class Referenceabstract

`#include <MolDraw2D.h>`

Inheritance diagram for RDKit::MolDraw2D:

## Public Types

enum | OrientType { C = 0, N, E, S, W }

## Public Member Functions

| MolDraw2D (int width, int height)
virtual | ~MolDraw2D ()
virtual void | drawMolecule (const ROMol &mol, const std::vector< int > *highlight_atoms=NULL, const std::map< int, DrawColour > *highlight_map=NULL, const std::map< int, double > *highlight_radii=NULL, int confId=-1)
virtual void | drawMolecule (const ROMol &mol, const std::vector< int > *highlight_atoms, const std::vector< int > *highlight_bonds, const std::map< int, DrawColour > *highlight_atom_map=NULL, const std::map< int, DrawColour > *highlight_bond_map=NULL, const std::map< int, double > *highlight_radii=NULL, int confId=-1)
virtual Point2D | getDrawCoords (const Point2D &mol_cds) const
virtual Point2D | getDrawCoords (int at_num) const
virtual Point2D | getAtomCoords (const std::pair< int, int > &screen_cds) const
virtual Point2D | getAtomCoords (int at_num) const
virtual int | width () const
virtual int | height () const
virtual double | scale () const
virtual void | calculateScale ()
virtual double | fontSize () const
virtual void | setFontSize (double new_size)
virtual void | setColour (const DrawColour &col)
virtual DrawColour | colour () const
virtual void | setDash (const DashPattern &patt)
virtual const DashPattern & | dash () const
virtual void | setLineWidth (int width)
virtual const int | lineWidth () const
bool | setStringDrawMode (const std::string &instring, int &draw_mode, int &i) const
virtual void | clearDrawing ()=0
virtual void | drawLine (const Point2D &cds1, const Point2D &cds2)=0
virtual void | getStringSize (const std::string &label, double &label_width, double &label_height) const =0
virtual void | drawString (const std::string &str, const Point2D &cds)
virtual void | drawPolygon (const std::vector< Point2D > &cds)=0
virtual void | drawTriangle (const Point2D &cds1, const Point2D &cds2, const Point2D &cds3)
virtual void | drawEllipse (const Point2D &cds1, const Point2D &cds2)
virtual void | drawRect (const Point2D &cds1, const Point2D &cds2)
virtual void | drawAttachmentLine (const Point2D &cds1, const Point2D &cds2, const DrawColour &col, double len=1.0, unsigned int nSegments=8)
virtual void | tagAtoms (const ROMol &mol)
virtual bool | fillPolys () const
virtual void | setFillPolys (bool val)
MolDrawOptions & | drawOptions ()
const MolDrawOptions & | drawOptions () const
const std::vector< Point2D > & | atomCoords () const
const std::vector< std::pair< std::string, OrientType > > & | atomSyms () const

## Detailed Description

Definition at line 60 of file MolDraw2D.h.

## Member Enumeration Documentation

enum RDKit::MolDraw2D::OrientType

Enumerator
C |
N |
E |
S |
W |

Definition at line 63 of file MolDraw2D.h.

## Constructor & Destructor Documentation

RDKit::MolDraw2D::MolDraw2D | ( | int | width,
|  | int | height
| ) |  |

virtual RDKit::MolDraw2D::~MolDraw2D | ( |  | ) |

inline virtual

Definition at line 66 of file MolDraw2D.h.

## Member Function Documentation

const std::vector<Point2D >& RDKit::MolDraw2D::atomCoords | ( |  | ) | const

inline

Definition at line 159 of file MolDraw2D.h.

const std::vector<std::pair<std::string,OrientType> >& RDKit::MolDraw2D::atomSyms | ( |  | ) | const

inline

Definition at line 160 of file MolDraw2D.h.

virtual void RDKit::MolDraw2D::calculateScale | ( |  | ) |

virtual

virtual void RDKit::MolDraw2D::clearDrawing | ( |  | ) |

pure virtual

Implemented in RDKit::MolDraw2Dwx, RDKit::MolDraw2DCairo, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

virtual DrawColour RDKit::MolDraw2D::colour | ( |  | ) | const

inline virtual

Definition at line 106 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::setColour().

virtual const DashPattern& RDKit::MolDraw2D::dash | ( |  | ) | const

inline virtual

Definition at line 109 of file MolDraw2D.h.

virtual void RDKit::MolDraw2D::drawAttachmentLine | ( | const Point2D & | cds1,
|  | const Point2D & | cds2,
|  | const DrawColour & | col,
|  | double | len = `1.0`,
|  | unsigned int | nSegments = `8`
| ) |  |

virtual

virtual void RDKit::MolDraw2D::drawEllipse | ( | const Point2D & | cds1,
|  | const Point2D & | cds2
| ) |  |

virtual

Reimplemented in RDKit::MolDraw2DSVG.

virtual void RDKit::MolDraw2D::drawLine | ( | const Point2D & | cds1,
|  | const Point2D & | cds2
| ) |  |

pure virtual

Implemented in RDKit::MolDraw2Dwx, RDKit::MolDraw2DCairo, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

virtual void RDKit::MolDraw2D::drawMolecule | ( | const ROMol & | mol,
|  | const std::vector< int > * | highlight_atoms = `NULL`,
|  | const std::map< int, DrawColour > * | highlight_map = `NULL`,
|  | const std::map< int, double > * | highlight_radii = `NULL`,
|  | int | confId = `-1`
| ) |  |

virtual

virtual void RDKit::MolDraw2D::drawMolecule | ( | const ROMol & | mol,
|  | const std::vector< int > * | highlight_atoms,
|  | const std::vector< int > * | highlight_bonds,
|  | const std::map< int, DrawColour > * | highlight_atom_map = `NULL`,
|  | const std::map< int, DrawColour > * | highlight_bond_map = `NULL`,
|  | const std::map< int, double > * | highlight_radii = `NULL`,
|  | int | confId = `-1`
| ) |  |

virtual

MolDrawOptions& RDKit::MolDraw2D::drawOptions | ( |  | ) |

inline

Definition at line 156 of file MolDraw2D.h.

const MolDrawOptions& RDKit::MolDraw2D::drawOptions | ( |  | ) | const

inline

Definition at line 157 of file MolDraw2D.h.

virtual void RDKit::MolDraw2D::drawPolygon | ( | const std::vector< Point2D > & | cds | ) |

pure virtual

Implemented in RDKit::MolDraw2Dwx, RDKit::MolDraw2DCairo, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

virtual void RDKit::MolDraw2D::drawRect | ( | const Point2D & | cds1,
|  | const Point2D & | cds2
| ) |  |

virtual

virtual void RDKit::MolDraw2D::drawString | ( | const std::string & | str,
|  | const Point2D & | cds
| ) |  |

virtual

Reimplemented in RDKit::MolDraw2DSVG.

virtual void RDKit::MolDraw2D::drawTriangle | ( | const Point2D & | cds1,
|  | const Point2D & | cds2,
|  | const Point2D & | cds3
| ) |  |

virtual

virtual bool RDKit::MolDraw2D::fillPolys | ( |  | ) | const

inline virtual

Definition at line 153 of file MolDraw2D.h.

virtual double RDKit::MolDraw2D::fontSize | ( |  | ) | const

inline virtual

Definition at line 100 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::setFontSize().

virtual Point2D RDKit::MolDraw2D::getAtomCoords | ( | const std::pair< int, int > & | screen_cds | ) | const

virtual

virtual Point2D RDKit::MolDraw2D::getAtomCoords | ( | int | at_num | ) | const

virtual

virtual Point2D RDKit::MolDraw2D::getDrawCoords | ( | const Point2D & | mol_cds | ) | const

virtual

Referenced by RDKit::MolDraw2Dwx::drawLine(), and RDKit::MolDraw2Dwx::drawPolygon().

virtual Point2D RDKit::MolDraw2D::getDrawCoords | ( | int | at_num | ) | const

virtual

virtual void RDKit::MolDraw2D::getStringSize | ( | const std::string & | label,
|  | double & | label_width,
|  | double & | label_height
| ) |  | const

pure virtual

Implemented in RDKit::MolDraw2Dwx, RDKit::MolDraw2DCairo, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

virtual int RDKit::MolDraw2D::height | ( |  | ) | const

inline virtual

Definition at line 95 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::clearDrawing(), and RDKit::MolDraw2Dwx::getStringSize().

virtual const int RDKit::MolDraw2D::lineWidth | ( |  | ) | const

inline virtual

Definition at line 112 of file MolDraw2D.h.

virtual double RDKit::MolDraw2D::scale | ( |  | ) | const

inline virtual

Definition at line 97 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::getStringSize(), and RDKit::MolDraw2Dwx::setFontSize().

virtual void RDKit::MolDraw2D::setColour | ( | const DrawColour & | col | ) |

inline virtual

Reimplemented in RDKit::MolDraw2DCairo, RDKit::MolDraw2Dwx, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

Definition at line 105 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::setColour().

virtual void RDKit::MolDraw2D::setDash | ( | const DashPattern & | patt | ) |

inline virtual

Definition at line 108 of file MolDraw2D.h.

virtual void RDKit::MolDraw2D::setFillPolys | ( | bool | val | ) |

inline virtual

Definition at line 154 of file MolDraw2D.h.

virtual void RDKit::MolDraw2D::setFontSize | ( | double | new_size | ) |

virtual

Reimplemented in RDKit::MolDraw2DCairo, RDKit::MolDraw2Dwx, RDKit::MolDraw2DSVG, and RDKit::MolDraw2DQt.

Referenced by RDKit::MolDraw2Dwx::setFontSize().

virtual void RDKit::MolDraw2D::setLineWidth | ( | int | width | ) |

inline virtual

Definition at line 111 of file MolDraw2D.h.

References width().

bool RDKit::MolDraw2D::setStringDrawMode | ( | const std::string & | instring,
|  | int & | draw_mode,
|  | int & | i
| ) |  | const

virtual void RDKit::MolDraw2D::tagAtoms | ( | const ROMol & | mol | ) |

inline virtual

Reimplemented in RDKit::MolDraw2DSVG.

Definition at line 151 of file MolDraw2D.h.

virtual int RDKit::MolDraw2D::width | ( |  | ) | const

inline virtual

Definition at line 94 of file MolDraw2D.h.

Referenced by RDKit::MolDraw2Dwx::clearDrawing(), RDKit::MolDraw2Dwx::getStringSize(), and setLineWidth().

The documentation for this class was generated from the following file:

- MolDraw2D.h