RDKit
Open-source cheminformatics and machine learning.
RDKit::MolDraw2DCairo Class Reference

#include <MolDraw2DCairo.h>

Inheritance diagram for RDKit::MolDraw2DCairo:
RDKit::MolDraw2D

Public Member Functions

 MolDraw2DCairo (int width, int height, cairo_t *cr, int panelWidth=-1, int panelHeight=-1)
 
 MolDraw2DCairo (int width, int height, int panelWidth=-1, int panelHeight=-1)
 
 ~MolDraw2DCairo ()
 
void setFontSize (double new_size)
 
void setColour (const DrawColour &col)
 
void finishDrawing ()
 
void drawLine (const Point2D &cds1, const Point2D &cds2)
 
void drawChar (char c, const Point2D &cds)
 
void drawPolygon (const std::vector< Point2D > &cds)
 
void clearDrawing ()
 
void drawWavyLine (const Point2D &cds1, const Point2D &cds2, const DrawColour &col1, const DrawColour &col2, unsigned int nSegments=16, double vertOffset=0.05)
 
void getStringSize (const std::string &label, double &label_width, double &label_height) const
 
std::string getDrawingText () const
 
void writeDrawingText (const std::string &fName) const
 
- Public Member Functions inherited from RDKit::MolDraw2D
 MolDraw2D (int width, int height, int panelWidth=-1, int panelHeight=-1)
 
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::string &legend, 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 void drawMolecule (const ROMol &mol, const std::string &legend, 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 void drawMolecules (const std::vector< ROMol * > &mols, const std::vector< std::string > *legends=NULL, const std::vector< std::vector< int > > *highlight_atoms=NULL, const std::vector< std::vector< int > > *highlight_bonds=NULL, const std::vector< std::map< int, DrawColour > > *highlight_atom_maps=NULL, const std::vector< std::map< int, DrawColour > > *highlight_bond_maps=NULL, const std::vector< std::map< int, double > > *highlight_radii=NULL, const std::vector< int > *confIds=NULL)
 
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 (const std::pair< double, double > &screen_cds) const
 
virtual Point2D getAtomCoords (int at_num) const
 
virtual int width () const
 
virtual int height () const
 
virtual int panelWidth () const
 
virtual int panelHeight () const
 
double scale () const
 
void calculateScale (int width, int height)
 
void calculateScale ()
 
void setScale (int width, int height, const Point2D &minv, const Point2D &maxv)
 
void setOffset (int x, int y)
 
Point2D offset ()
 
virtual double fontSize () const
 
virtual DrawColour colour () const
 
virtual void setDash (const DashPattern &patt)
 
virtual const DashPatterndash () const
 
virtual void setLineWidth (int width)
 
virtual int lineWidth () const
 
bool setStringDrawMode (const std::string &instring, TextDrawType &draw_mode, int &i) const
 
virtual void drawString (const std::string &str, const Point2D &cds)
 
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=16)
 
virtual void tagAtoms (const ROMol &mol)
 
virtual bool fillPolys () const
 
virtual void setFillPolys (bool val)
 
MolDrawOptionsdrawOptions ()
 
const MolDrawOptionsdrawOptions () const
 
const std::vector< Point2D > & atomCoords () const
 
const std::vector< std::pair< std::string, OrientType > > & atomSyms () const
 

Additional Inherited Members

- Public Types inherited from RDKit::MolDraw2D
enum  OrientType {
  C = 0, N, E, S,
  W
}
 
enum  TextDrawType { TextDrawNormal = 0, TextDrawSuperscript, TextDrawSubscript }
 
- Protected Member Functions inherited from RDKit::MolDraw2D
virtual void doContinuousHighlighting (const ROMol &mol, const std::vector< int > *highlight_atoms, const std::vector< int > *highlight_bonds, const std::map< int, DrawColour > *highlight_atom_map, const std::map< int, DrawColour > *highlight_bond_map, const std::map< int, double > *highlight_radii)
 
virtual void highlightCloseContacts ()
 
Point2D calcPerpendicular (const Point2D &cds1, const Point2D &cds2)
 

Detailed Description

Definition at line 25 of file MolDraw2DCairo.h.

Constructor & Destructor Documentation

RDKit::MolDraw2DCairo::MolDraw2DCairo ( int  width,
int  height,
cairo_t *  cr,
int  panelWidth = -1,
int  panelHeight = -1 
)
inline

Definition at line 28 of file MolDraw2DCairo.h.

RDKit::MolDraw2DCairo::MolDraw2DCairo ( int  width,
int  height,
int  panelWidth = -1,
int  panelHeight = -1 
)
inline

Definition at line 34 of file MolDraw2DCairo.h.

RDKit::MolDraw2DCairo::~MolDraw2DCairo ( )
inline

Member Function Documentation

void RDKit::MolDraw2DCairo::clearDrawing ( )
virtual

Implements RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::drawChar ( char  c,
const Point2D cds 
)
virtual

Implements RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::drawLine ( const Point2D cds1,
const Point2D cds2 
)
virtual

Implements RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

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

Implements RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::drawWavyLine ( const Point2D cds1,
const Point2D cds2,
const DrawColour col1,
const DrawColour col2,
unsigned int  nSegments = 16,
double  vertOffset = 0.05 
)
virtual

Reimplemented from RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::finishDrawing ( )

Referenced by ~MolDraw2DCairo().

std::string RDKit::MolDraw2DCairo::getDrawingText ( ) const

Referenced by ~MolDraw2DCairo().

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

Implements RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::setColour ( const DrawColour col)
virtual

Reimplemented from RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::setFontSize ( double  new_size)
virtual

Reimplemented from RDKit::MolDraw2D.

Referenced by ~MolDraw2DCairo().

void RDKit::MolDraw2DCairo::writeDrawingText ( const std::string &  fName) const

Referenced by ~MolDraw2DCairo().


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