OEHighlightByLasso

class OEHighlightByLasso : public OEHighlightBase

The OEHighlightByLasso class allows the customization of the lasso highlighting style that is associated with the OEHighlightStyle_Lasso constant. See example in Figure: Example of highlighting using the ‘lasso’ style.

../../_images/OEHighlightStyle_Lasso.png

Example of highlighting using the ‘lasso’ style

The OEHighlightByLasso class stores the following properties:

Property

Get method

Set method

Corresponding namespace / class / type

atom label color

GetAtomLabelMonochrome

SetAtomLabelMonochrome

boolean

atom label box

GetConsiderAtomLabelBoundingBox

SetConsiderAtomLabelBoundingBox

boolean

color

GetColor

SetColor

OEColor

pen

GetPen

SetPen

OEPen

position

GetPosition

SetPosition

OELayerPosition namespace

lasso scale

GetLassoScale

SetLassoScale

floating point number

line width scale

GetLineWidthScale

SetLineWidthScale

floating point

Constructors

OEHighlightByLasso(const OESystem::OEColor &color,
                   double lassoScale=3.0,
                   bool monochrome=true,
                   bool considerAtomLabelBox = false,
                   unsigned int position = OELayerPosition::Below,
                   double lineWidthScale = 1.0)

Creates an OEHighlightByLasso object with the specified parameters.

color

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

lassoScale

The multiplier that can be used to increase or decrease the distance of the “lasso” from the highlighted atom(s) and bond(s). See also OEHighlightByLasso.SetLassoScale method.

monochrome

Defines whether or not to change the color of the atom label of the highlighted atom(s). See also OEHighlightByLasso.SetAtomLabelMonochrome method.

considerAtomLabelBox

Determines whether or not to consider the atom label bounding boxes when generating the ‘lasso’ highlights. See also OEHighlightByLasso.SetConsiderAtomLabelBoundingBox method.

position

Defines whether the ‘lasso’ highlight is going to be rendered below or above the molecule. See also OEHighlightByLasso.SetPosition method.

lineWidthScale

The multiplier that can be used to increase or decrease the line width of lasso. See also OEHighlightByLasso.SetLineWidthScale method.

OEHighlightByLasso(const OEHighlightByLasso &rhs)

Copy constructor.

operator=

OEHighlightByLasso &operator=(const OEHighlightByLasso &rhs)

Assignment operator.

CreateCopy

OEHighlightBase *CreateCopy() const

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

GetAtomLabelMonochrome

bool GetAtomLabelMonochrome() const

Returns whether or not the color of the atom label of the highlighted atom(s) is changed.

GetConsiderAtomLabelBoundingBox

bool GetConsiderAtomLabelBoundingBox() const

Returns whether or not to consider the atom label bounding boxes when generating the ‘lasso’ highlights.

GetLassoScale

double GetLassoScale() const

Returns the multiplier that can be used to increase or decrease the distance of the line of the ‘lasso’ from the highlighted atom(s) and bonds(s).

GetLineWidthScale

double GetLineWidthScale() const

Returns the multiplier that can be used to increase or decrease the line width of the lasso.

GetColor

const OESystem::OEColor &GetColor() const

Returns the foreground color of the highlighting.

See also

GetPen

const OEPen &GetPen() const

Returns the pen of the highlighting.

See also

GetPosition

unsigned int GetPosition() const

Returns whether the ‘lasso’ highlight is going to be render above or below the molecule. The return value is taken from the OELayerPosition namespace.

SetAtomLabelMonochrome

void SetAtomLabelMonochrome(bool monochrome)

Sets whether or not to change the color of the atom label of the highlighted atom(s).

Example (Figure: Example of using the SetAtomLabelMonochrome method)

highlight = oedepict.OEHighlightByLasso(oechem.OEDarkGreen)
highlight.SetAtomLabelMonochrome(False)
../../_images/OEHighlightByLasso_SetAtomLabelMonochrome.png

Example of using the SetAtomLabelMonochrome method

SetConsiderAtomLabelBoundingBox

void SetConsiderAtomLabelBoundingBox(bool consider)

Sets whether or not to consider the atom label bounding boxes when generating the ‘lasso’ highlights. By considering the bounding boxes, the number cases when the lines of the highlight clash with the atom label can be reduced.

Example (Figure: Example of using the SetConsiderAtomLabelBoundingBox method)

highligh = oedepict.OEHighlightByLasso(oechem.OEDarkGreen)
highlight.SetConsiderAtomLabelBoundingBox(True)
../../_images/OEHighlightByLasso_SetConsiderAtomLabelBoundingBox.png

Example of using the SetConsiderAtomLabelBoundingBox method

SetLassoScale

void SetLassoScale(double lassoScale)

Sets the multiplier that can be used to increase or decrease the distance of the line of the ‘lasso’ from the highlighted atom(s) and bond(s).

Example (Figure: Example of using the SetLassoScale method)

highlight = oedepict.OEHighlightByLasso(oechem.OEDarkGreen)
highlight.SetLassoScale(6.0)
../../_images/OEHighlightByLasso_SetLassoScale.png

Example of using the SetLassoScale method

SetLineWidthScale

void SetLineWidthScale(double lineWidthScale)

Sets the multiplier that can be used to increase or decrease the line width of the lasso.

Example (Figure: Example of using the SetLineWidthScale method)

highligh = oedepict.OEHighlightByLasso(oechem.OEDarkGreen)
highlight.SetLineWidthScale(3.0)
../../_images/OEHighlightByLasso_SetLineWidthScale.png

Example of using the SetLineWidthScale method

SetColor

void SetColor(const OESystem::OEColor &color)

Sets the foreground color of the highlighting.

Example (Figure: Example of using the SetColor method)

highlight.SetColor(oechem.OEDarkGreen)
../../_images/OEHighlightByLasso_SetColor.png

Example of using the SetColor method

See also

SetPen

void SetPen(const OEPen &pen)

Sets the pen of the highlighting.

Example (Figure: Example of using the SetPen method)

pen = oedepict.OEPen(oechem.OEGreenTint, oechem.OEDarkGreen,
                     oedepict.OEFill_On, 3.0, oedepict.OEStipple_Dot)
highlight.SetPen(pen)
../../_images/OEHighlightByLasso_SetPen.png

Example of using the SetPen method

See also

SetPosition

void SetPosition(unsigned int position)

Sets whether the ‘lasso’ highlight is going to be render above or below the molecule.

position

This value has to be from the OELayerPosition namespace.