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.
See also
OESVGGroup class
OEAddSVGClickEvent
functionOEAddSVGToggle
function
Example:
OESVGGroup* hover_area = image.NewSVGGroup("hover_area");
OESVGGroup* target_area = image.NewSVGGroup("hover_target_area");
OEAddSVGHover(hover_area, target_area);
image.PushGroup(hover_area);
image.DrawRectangle(OE2DPoint(30, 30), OE2DPoint(70, 70), OERedBoxPen);
image.PopGroup(hover_area);
image.PushGroup(target_area);
image.DrawCircle(OE2DPoint(150, 50), 30, OEBlueBoxPen);
image.PopGroup(target_area);
OEAddInteractiveIcon(image);
OEWriteImage("AddSVGHover.svg", image);
Download code
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
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.