CoordToPixel

Description:              This function takes a specified coordinate pair and returns an actual onscreen pixel location.

Returns:                    Numeric

Usage:                       Script

Format:                      CoordToPixel(Object, CoordX, CoordY, Option)

Parameters:             Object    { scope context }  { required }  { no default: }

                                                The context in which to transform the coordinates.

                                    CoordX    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the x-coordinate to convert.

                                    CoordY    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the y-coordinate to convert.

                                    Option    { numeric }  { required }  { no default: }

                                                Any numeric expression specifying the converted coordinate to return, where 0 returns the converted x-coordinate, and 1 returns the converted y-coordinate.

Comments:               This function's return value is determined by the Option parameter.

Example:

If 1 Main;

[

  xPixel = CoordToPixel(Self(), xCoord, yCoord, 0);

  yPixel = CoordToPixel(Self(), xCoord, yCoord, 1);

]

This converts the point specified by the user coordinates (xCoord, yCoord) in the current module to screen coordinates (pixel location).

See Also:

Coordinates