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(color: OEColor, lassoScale: float = 3.0,
                   monochrome: bool = True,
                   considerAtomLabelBox: bool = False,
                   position: int, lws: float = 1.0) -> OEHighlightByLasso

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(rhs: OEHighlightByLasso) -> OEHighlightByLasso

Copy constructor.

CreateCopy

CreateCopy() -> OEHighlightByLasso

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

GetAtomLabelMonochrome() -> bool

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

GetConsiderAtomLabelBoundingBox

GetConsiderAtomLabelBoundingBox() -> bool

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

GetLassoScale

GetLassoScale() -> float

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

GetLineWidthScale() -> float

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

GetColor

GetColor() -> OEColor

Returns the foreground color of the highlighting.

See also

GetPen

GetPen() -> OEPen

Returns the pen of the highlighting.

See also

GetPosition

GetPosition() -> int

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

SetAtomLabelMonochrome(monochrome: bool) -> None

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

SetConsiderAtomLabelBoundingBox(consider: bool) -> None

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

SetLassoScale(lassoScale: float) -> None

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

SetLineWidthScale(lineWidthScale: float) -> None

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

SetColor(color: OEColor) -> None

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

SetPen(pen: OEPen) -> None

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

SetPosition(arg2: int) -> None

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.