Open Babel  3.0
Public Types | Public Member Functions | List of all members
OBDepict Class Reference

#include <openbabel/depict/depict.h>

Public Types

enum  AtomLabelType {
  AtomId = 1, AtomIndex, AtomSymmetryClass, AtomValence,
  AtomTetrahedralStereo
}
 
enum  OptionType {
  bwAtoms = 0x0001, internalColor = 0x0002, noMargin = 0x0004, drawTermC = 0x0010,
  drawAllC = 0x0020, noWedgeHashGen = 0x0100, asymmetricDoubleBond = 0x0200, allExplicit = 0x0400
}
 

Public Member Functions

 OBDepict (OBPainter *painter)
 
 OBDepict (OBPainter *painter, bool withBall, bool symbolOnBall=false)
 
 ~OBDepict ()
 
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

◆ AtomLabelType

Enumerator
AtomId 
AtomIndex 
AtomSymmetryClass 
AtomValence 
AtomTetrahedralStereo 

◆ OptionType

enum OptionType
Enumerator
bwAtoms 
internalColor 
noMargin 
drawTermC 
drawAllC 
noWedgeHashGen 
asymmetricDoubleBond 
allExplicit 

Constructor & Destructor Documentation

◆ OBDepict() [1/2]

OBDepict ( OBPainter painter)

Constructors.

◆ OBDepict() [2/2]

OBDepict ( OBPainter painter,
bool  withBall,
bool  symbolOnBall = false 
)

◆ ~OBDepict()

~OBDepict ( )

Destructor.

Member Function Documentation

◆ DrawMolecule()

bool DrawMolecule ( OBMol mol)

Draw mol using the painter previously stored in the constructor.

Returns
True if successful.

d->drawTerminalC)

◆ AddAtomLabels()

bool AddAtomLabels ( AtomLabelType  type)

Draw atom labels of a specified type.

Returns
True if successful.

◆ SetBondLength()

void SetBondLength ( double  length)

◆ GetBondLength()

double GetBondLength ( ) const

◆ SetPenWidth()

void SetPenWidth ( double  length)

◆ GetPenWidth()

double GetPenWidth ( ) const

◆ SetBondSpacing()

void SetBondSpacing ( double  spacing)

◆ GetBondSpacing()

double GetBondSpacing ( ) const

◆ SetBondWidth()

void SetBondWidth ( double  width)

◆ GetBondWidth()

double GetBondWidth ( ) const

◆ SetOption()

void SetOption ( unsigned  opts)

◆ GetOptions()

unsigned GetOptions ( ) const

◆ ClearOptions()

void ClearOptions ( )

◆ SetFontFamily()

void SetFontFamily ( const std::string &  family)

◆ GetFontFamily()

const std::string & GetFontFamily ( ) const

◆ SetFontSize()

void SetFontSize ( int  pointSize,
bool  subscript = false 
)

◆ GetFontSize()

int GetFontSize ( bool  subscript = false) const

Referenced by OBDepict::AddAtomLabels().

◆ SetAliasMode()

void SetAliasMode ( bool  b = true)

◆ SetBondColor()

void SetBondColor ( const std::string &  scolor)

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