Visit Gigasoft's Web Site
 ProEssentials v9 Help

ConvPixelToGraph

Scope

Pego, Pesgo, Pepso

 

public int PeFunction.ConvPixelToGraph(
     ref int axisIndex,
     ref int pixelX,
     ref int pixelY,
     ref double graphX,
     ref double graphY,
     bool rightAxis,
     bool topAxis,
     bool viceVersa)

 

Parameter

Description

axisIndex

Axis index passed by reference.

pixelX

X axis coordinate pixel passed by reference.

pixelY

Y axis coordinate pixel passed by reference.

graphX

X axis coordinate graph value passed by referece.

graphY

Y axis coordinate graph value passed by reference.

rightAxis

True to use right Y axis, else use left axis.

topAxis

True to use top X axis, else use bottom axis.

viceVersa

True to convert graph coordinates 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 pixelX and pixelY with the client coordinates (0,0 represents the top-left corner of the control.) Call this function with viceVersa = FALSE and the resulting graph coordinates will be stored in the double precision variables pointed to by graphX and graphY. In the case of multiple y axes, axisIndex will hold the resulting zero based axis index.

 

To convert graph coordinates to client pixel coordinates: Initialize the double precision variables pointed to by graphX and graphY with the graph coordinates. If the graph has multiple y axes, also initialize the zero based axis index pointed to by axisIndex. Call this function with viceVersa = TRUE and the resulting client pixel coordinates will be stored in the integer variables pointed to by pixelX and pixelY.

 

If the graph has a right y axis or bottom x axis, you can perform conversions with respect to these axes with the rightAxis and topAxis 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 axisIndex should point to an integer that is initialized with the axis you want used when viceVersa 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

Within the demo, see example 007 and 125.

 

PeFunction.ConvPixelToGraph members of Pego.PeFunction, Pesgo.PeFunction, Pepso.PeFunction