OE2DBondDisplay¶
class OE2DBondDisplay : public OEBondDisplayBase
This class stores 2D depiction information of a bond. See Figure: OEDepict TK bond display class hierarchy.
OEDepict TK bond display class hierarchy¶
The following methods are publicly inherited from OEBondDisplayBase:
The OE2DBondDisplay class stores the following properties:
Property |
Get method |
Set method |
Corresponding namespace / class / type |
|---|---|---|---|
pen used to draw the begin of the bond |
OEPen class |
||
pen used to draw the end of the bond |
OEPen class |
||
position of multi-line bonds |
|
||
rendered bond type |
|
||
rendered string as property |
string |
||
font of property string |
OEFont class |
||
position of property label |
OE2DPoint class |
Constructors¶
OE2DBondDisplay(const OEChem::OEBondBase* bond)
Construct an OE2DBondDisplay object that
contains the style information for bond.
OE2DBondDisplay(const OE2DBondDisplay &rhs)
Copy constructor.
CreateCopy¶
OESystem::OEBase *CreateCopy() const
Deep copy constructor that returns a pointer to a copy of the object. The memory returned is dynamically allocated and owned by the caller.
GetBgnPen¶
const OEPen &GetBgnPen() const
Returns the pen used to draw the bond from the “begin” atom coordinates to the middle of the bond.
See also
OE2DBondDisplay.SetBgnPenmethodOEPen class
GetDisplayPos¶
unsigned int GetDisplayPos() const
Returns how multi-line bonds should be rendered. The return
value is taken from the
OEBondDisplayPosition namespace.
Note
The OEBondDisplayPosition namespace
only affects bonds of the following types (as returned by
OE2DBondDisplay.GetDisplayType):
See also
OEBondDisplayPositionnamespace
GetDisplayType¶
unsigned int GetDisplayType() const
Returns how bond orders, stereochemistry, and aromaticity is
rendered for the bond. The return value is taken from the
OEBondDisplayType namespace.
See also
OEBondDisplayTypenamespace
GetEndPen¶
const OEPen &GetEndPen() const
Returns the pen used to draw the bond from the “end” atom coordinates to the middle of the bond.
See also
OE2DBondDisplay.SetEndPenmethodOEPen class
GetProperty¶
const std::string &GetProperty() const
Returns the string displayed next to the bond.
See also
OE2DBondDisplay.SetPropertymethod
GetPropertyFont¶
const OEFont &GetPropertyFont() const
Returns the font that is used when displaying the property string of the OE2DBondDisplay object.
See also
OE2DBondDisplay.SetPropertymethodOEFont class
GetPropertyOffset¶
const OE2DPoint &GetPropertyOffset() const
Returns the offset vector (relative to the middle of the bond) that is used to position the property label of the bond. See Figure: The property offset vector is relative to the middle of the displayed bond.
The property offset vector is relative to the middle of the displayed bond¶
This allows for any string representable information to be rendered at a logical location near the bond. See example in Example of displaying indices as bond property.
Example of displaying indices as bond property¶
See also
OE2DPoint class
HasProperty¶
bool HasProperty() const
Return whether or not the property string of the OE2DBondDisplay object is empty.
See also
OE2DBondDisplay.GetPropertymethodOE2DBondDisplay.SetPropertymethod
SetBgnPen¶
void SetBgnPen(const OEPen &pen)
Sets the pen used to draw the bond from the “begin” atom coordinates to the middle of the bond.
See also
OE2DBondDisplay.GetBgnPenmethodOEPen class
SetDisplayPos¶
void SetDisplayPos(unsigned int pos)
Sets the display position of the bond.
- pos
This value has to be from the
OEBondDisplayPositionnamespace.
See also
OEBondDisplayPositionnamespace
SetDisplayType¶
void SetDisplayType(unsigned int type)
Sets the display style of the bond.
- type
This value has to be from the
OEBondDisplayTypenamespace.
See also
OEBondDisplayTypenamespace
SetEndPen¶
void SetEndPen(const OEPen &pen)
Sets the pen used to draw the bond from the “end” atom coordinates to the middle of the bond.
See also
OE2DBondDisplay.GetEndPenmethodOEPen class
SetProperty¶
void SetProperty(const std::string &label)
Sets the string displayed next to the bond.
Warning
The preferred way to set the bond property strings is to use
OE2DMolDisplayOptions.SetBondPropertyFunctor
method.
See example in the Displaying Bond Properties
section.
See also
SetPropertyFont¶
void SetPropertyFont(const OEFont &font)
Sets the font that is used when displaying the property string of the OE2DBondDisplay object.
Warning
The preferred way to set the font of the bond property strings
is to use OE2DMolDisplayOptions.SetBondPropLabelFont
method.
See also
OE2DBondDisplay.GetPropertymethodOEFont class