PlaceXY

Place, X and Y
You can position the drawing pen in a graphic object with the **Place** method. You can retrieve the current pen position X coordinate with the **X** method and the Y coordinate with the **Y** method. Because the **X** and **Y** methods return values, you must either include them as part of a larger expression, or assign the values to variables, as is done below.

The syntax for **Place** is as follows:
 * 1) handle PLACE(x, y) - Set the position to be x, y

The syntax for **X**: Usage: posX = #handle(X)
 * 1) handle X - Return the current position x

The syntax for **Y** Usage: posY = #handle(Y)
 * 1) handle Y - Return the current position y

The following demo positions the drawing pen, then retrieves the coordinates and prints the values in the graphics area.

code format="vbnet" 'create a graphic object graphic #g, 800, 600

'locate the drawing pen at 10,10
 * 1) g place(10,10)

'retrieve the X coordinate of the pen posX = #g X

'retrieve the Y coordinate of the pen posY = #g Y

'print the info in the graphic object
 * 1) g "\The pen position is ";posX;", ";posY

'display graphic on web page render #g code