Visit Gigasoft's Web Site
 ProEssentials v9 Help

PEconvpixeltograph

BOOL PEconvpixeltograph (hObject, lpnAxis, lpnX, lpnY, lpfX, lpfY, bRight, bTop, bViceVersa)

 

HWND

hObject 

The handle returned from PEcreate.

UINT*

lpnAxis

Pointer to zero based axis index.

UINT*

lpnX

Pointer to X axis coordinate pixel.

UINT*

lpnY 

Pointer to Y axis coordinate pixel.

DOUBLE*

lpfX

Pointer to X axis coordinate graph value.

DOUBLE*

lpfY 

Pointer to Y axis coordinate graph value.

BOOL

bRight 

True to use Right Y Axis, else use Left.

BOOL

bTop

True to use Top X Axis, else use Bottom.

BOOL

bViceVersa

True to convert graph to pixels.

 

This function converts client pixel coordinates to graph coordinates or vice versa, converts graph coordinates to client pixel coordinates.

 

To convert client pixel coordinates to graph coordinates: Initialize the integers pointed to by lpnX and lpnY with the client coordinates (0,0 represents the top-left corner of the control.) Call this function with bViceVersa = FALSE and the resulting graph coordinates will be stored in the double precision variables pointed to by lpfX and lpfY. In the case of multiple y axes, lpnAxis will hold the resulting zero based axis index.

 

To convert graph coordinates to client pixel coordinates: Initialize the double precision variables pointed to by lpfX and lpfY with the graph coordinates. If the graph has multiple y axes, also initialize the zero based axis index pointed to by lpnAxis. Call this function with bViceVersa = TRUE and the resulting client pixel coordinates will be stored in the integer variables pointed to by lpnX and lpnY.

 

If the graph has a right y axis or bottom x axis, you can perform conversions with respect to these axes with the bRight and bTop arguments. Keep in mind that right y axis and top x axis is referring to the use of RYAxisComparisonSubsets and/or TXAxisComparisonSubsets.

 

If OverlapMultiAxes is being implemented, then lpnAxis should point to an integer that is initialized with the axis you want used when bViceVersa is FALSE. Since axes are overlapping there is no way to know which axis to use unless the developer provides this data.

 

Returns

NonZero if the function was successful, otherwise Zero.

 

Comments

The included example projects 007 show examples of calling this function.