OEDrawSVGHoverTextΒΆ

Attention

PRELIMINARY-IMAGE This is a preliminary API until 2018.Feb and may be improved based on user feedback. It is currently available in C++ and Python.

bool OEDrawSVGHoverText(OE2DMolDisplay &disp, const OE2DAtomDisplay *adisp,
                        const std::string &text, const OEFont &font)

bool OEDrawSVGHoverText(OE2DMolDisplay &disp, const OE2DBondDisplay *bdisp,
                        const std::string &text, const OEFont &font)

Creates and interactive effect in .svg images. The given text will appear when the mouse is hovering over the position defined by the given atom / bond display.

Note

This functionality is only available for .svg image format. In other image formats the given text will be rendered to the given position permanently.

The generated svg image should be included into and HTML page with the SVG MIME type.

<object data="<imagename>.svg" type="image/svg+xml"></object>
disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
adisp
The OE2DAtomDisplay object that defines where the text will appear.
bdisp
The OE2DBondDisplay object that defines where the text will appear.
text
The text that appears when the cursor is hovered over the given position.
font
The graphical properties of the font used to draw the text.

Warning

This example is not available in Java.

hover mouse over any atoms

Example of using the OEDrawSVGHoverText function for atom positions

Warning

This example is not available in Java.

hover mouse over the middle of any bonds

Example of using the OEDrawSVGHoverText function for bond positions

See also