OEAddSVGHover

bool OEAddSVGHover(OESVGGroup *area, OESVGGroup *target)

Adds a hover effect to the objects drawn between the two given groups. While hovering the mouse over objects drawn inside the area group the objects drawn in the target group are displayed.

Note

This functionality is only available for .svg image format.

Example:

hover_area = image.NewSVGGroup("hover_area")
target_area = image.NewSVGGroup("hover_target_area")

oedepict.OEAddSVGHover(hover_area, target_area)

image.PushGroup(hover_area)
image.DrawRectangle(oedepict.OE2DPoint(30, 30),
                    oedepict.OE2DPoint(70, 70), oedepict.OERedBoxPen)
image.PopGroup(hover_area)

image.PushGroup(target_area)
image.DrawCircle(oedepict.OE2DPoint(150, 50), 30, oedepict.OEBlueBoxPen)
image.PopGroup(target_area)

oedepict.OEAddInteractiveIcon(image)

oedepict.OEWriteImage("AddSVGHover.svg", image)

Download code

AddSVGHover.py

Hint

The OEAddSVGHover function should always be called prior to pushing / popping the OESVGGroup objects.

hover the mouse over the red rectangle below

Example of using the OEAddSVGHover function

../../_images/AddSVGHover.svg

bool OEAddSVGHover(OESVGGroup* area, OESVGGroup* targetA, OESVGGroup* targetB)

Adds a hover effect to the objects drawn between the three given groups. While hovering the mouse over objects drawn inside the area group the objects drawn in the targetA and targetB groups are displayed.

Note

This functionality is only available for .svg image format.