ChartDirector 7.1 (C++ Edition)

ImageMapHandler.getHotSpot


Usage

int getHotSpot(double x, double y, BaseChart *c = 0);

Description

Gets the hot spot under the given point as the current hot spot.

This method will retrieve the hot spot under the given point as the "current hot spot". Its attributes can then be retrieved using ImageMapHandler.getKey, ImageMapHandler.getValue and ImageMapHandler.getValue2.

This method returns an integer representing the hot spot, or -1 if the point is not over any hot spot. Each hot spot region is represented by a unique integer, which can be any arbitrary number. The number is mainly used to determine if the cursor has changed from one hot spot to another hot spot.

Arguments

ArgumentDefaultDescription
x(Mandatory)The x coordinate of a point of which the hot spot is to be retrieved.
y(Mandatory)The y coordinate of a point of which the hot spot is to be retrieved.
c[Null]The BaseChart object that provides the hot spot. This argument is only necessary for surface charts or charts that contain contour layers.

Return Value

An integer representing the hot spot, or -1 if the given point is not over any hot spot.