OEHighlightByColor

class OEHighlightByColor : public OEHighlightBase

The OEHighlightByColor class allows the customization of the color highlighting style that is associated with the OEHighlightStyle_Color constant. See example in Figure: Example of highlighting using the ‘color’ style.

../../_images/OEHighlightStyle_Color.png

Example of highlighting using the ‘color’ style

The OEHighlightByColor class stores the following properties:

Property

Get method

Set method

Corresponding namespace / class / type

external highlight

GetAtomExternalHighlight

SetAtomExternalHighlight

boolean

color

GetColor

SetColor

OEColor

line width scale

GetLineWidthScale

SetLineWidthScale

floating point

Constructors

OEHighlightByColor(color: OEColor, lineWidthScale: float = 1.5,
                   atomExternalHighlight: bool = False) -> OEHighlightByColor

Creates an OEHighlightByColor object with the specified parameters.

color

The color used for highlighting. See also OEHighlightByColor.SetColor method.

lineWidthScale

The multiplier that can be used to increase or decrease the line width of highlighted bond(s). See also OEHighlightByColor.SetLineWidthScale method.

atomExternalHighlight

Sets whether atom highlights are extended to bonds not being highlighted. See also OEHighlightByColor.SetAtomExternalHighlight method.

OEHighlightByColor(rhs: OEHighlightByColor) -> OEHighlightByColor

Copy constructor.

CreateCopy

CreateCopy() -> OEHighlightByColor

Deep copy constructor that returns a copy of the object. The memory for the returned OEHighlightByColor object is dynamically allocated and owned by the caller.

GetAtomExternalHighlight

GetAtomExternalHighlight() -> bool

Returns whether external atom highlight is applied.

GetColor

GetColor() -> OEColor

Returns the color of the highlighting.

See also

GetLineWidthScale

GetLineWidthScale() -> float

Returns the multiplier that can be used to increase or decrease the line width of highlighted bond(s).

SetAtomExternalHighlight

SetAtomExternalHighlight(atomexternal: bool) -> None

Sets whether atom highlights are extended to bonds not being highlighted.

Example (Figure: Example of using the SetAtomExternalHighlight method)

highlight = oedepict.OEHighlightByColor(oechem.OELightOrange)
highlight.SetAtomExternalHighlight(True)
../../_images/OEHighlightByColor_SetAtomExternalHighlight.png

Example of using the SetAtomExternalHighlight method

SetColor

SetColor(color: OEColor) -> None

Sets the color of the highlighting.

Example (Figure: Example of using the SetColor method)

highlight.SetColor(oechem.OEDarkRed)
../../_images/OEHighlightByColor_SetColor.png

Example of using the SetColor method

See also

SetLineWidthScale

SetLineWidthScale(lineWidthScale: float) -> None

Sets the multiplier that can be used to increase or decrease the line width of highlighted bond(s).

Example (Figure: Example of using the SetLineWidthScale method)

highlight = oedepict.OEHighlightByColor(oechem.OEDarkRed)
highlight.SetLineWidthScale(3.0)
../../_images/OEHighlightByColor_SetLineWidthScale.png

Example of using the SetLineWidthScale method