Open Babel: OBDepict Class Reference

Public Types | Public Member Functions

# OBDepict Class Reference

2D depiction of molecules using OBPainter. More...

`#include <openbabel/depict/depict.h>`

List of all members.

## Public Types
enum | AtomLabelType { AtomId = 1, AtomIndex, AtomSymmetryClass, AtomValence, AtomTetrahedralStereo }
enum | OptionType { bwAtoms = 0x0001, internalColor = 0x0002, drawTermC = 0x0010, drawAllC = 0x0020, genWedgeHash = 0x0100 }
## Public Member Functions
| OBDepict (OBPainter *painter)
bool | DrawMolecule (OBMol *mol)
bool | AddAtomLabels (AtomLabelType type)
void | SetBondLength (double length)
double | GetBondLength () const
void | SetPenWidth (double length)
double | GetPenWidth () const
void | SetBondSpacing (double spacing)
double | GetBondSpacing () const
void | SetBondWidth (double width)
double | GetBondWidth () const
void | SetOption (unsigned opts)
unsigned | GetOptions () const
void | ClearOptions ()
void | SetFontFamily (const std::string &family)
const std::string & | GetFontFamily () const
void | SetFontSize (int pointSize, bool subscript=false)
int | GetFontSize (bool subscript=false) const
void | SetAliasMode (bool b=true)
void | SetBondColor (const std::string &scolor)

## Detailed Description

2D depiction of molecules using OBPainter.

Since:
  version 2.3

## Member Enumeration Documentation

enum AtomLabelType

Enumerator:

  AtomId |
  AtomIndex |
  AtomSymmetryClass |
  AtomValence |
  AtomTetrahedralStereo |

enum OptionType

Enumerator:

  bwAtoms |
  internalColor |
  drawTermC |
  drawAllC |
  genWedgeHash |

## Constructor & Destructor Documentation

OBDepict | ( | OBPainter * | painter ) |

Constructor.

## Member Function Documentation

bool DrawMolecule | ( | OBMol * | mol ) |

Draw `mol` using the painter previously stored in the constructor.

Returns:
  True if successful.

d->drawTerminalC)

bool AddAtomLabels | ( | AtomLabelType | type ) |

Draw atom labels of a specified `type`.

Returns:
  True if successful.

void SetBondLength | ( | double | length ) |

double GetBondLength | ( | ) | const

void SetPenWidth | ( | double | length ) |

double GetPenWidth | ( | ) | const

void SetBondSpacing | ( | double | spacing ) |

double GetBondSpacing | ( | ) | const

void SetBondWidth | ( | double | width ) |

double GetBondWidth | ( | ) | const

void SetOption | ( | unsigned | opts ) |

unsigned GetOptions | ( | ) | const

void ClearOptions | ( | ) |

void SetFontFamily | ( | const std::string & | family ) |

const std::string & GetFontFamily | ( | ) | const

void SetFontSize | ( | int | pointSize,
|  | bool | subscript = `false`
| ) |  |

int GetFontSize | ( | bool | subscript = `false` ) | const

Referenced by OBDepict::AddAtomLabels().

void SetAliasMode | ( | bool | b = `true` ) |

void SetBondColor | ( | const std::string & | scolor ) |

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

- depict.h
- depict.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines