BB___POSXY

=POSXY= toc

Description
> In a graphics window or graphicbox, POSXY places the current x,y coords of the pen in the specified variables.

Syntax
//This command is NOT case sensitive//.
 * 1)  - in graphics window
 * 2)  - in graphicbox

Hints
Here is a list of commands that affect the pen position or status: down go goto home north place posxy set size turn up

Example
An example of the command in a graphics window. code format="lb" nomainwin WindowWidth=400 WindowHeight=300

open "Command Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put pen down #g "down; home" 'get pen position #g "posxy x y"   'set pen size #g "size 3" 'print the coords of home position #g "color blue" #g "\\"; x; " "; y   'place dot at center of circle and draw circle #g "set "; x; " "; y   #g "color red; circle 50" 'draw a radial dimension line #g "home; color black; size 1; north" #g "turn 45; go 50" 'get current pen position #g "posxy cx cy" 'place pen in position for text and print radius #g "up; goto "; cx+10; " ";cy-10 #g "color blue;\r=50" wait

[quit] close #g end code

An example of the command in a graphicbox. code format="lb" nomainwin WindowWidth=400 WindowHeight=300

graphicbox #g.gb 2, 2, 390, 270 open "Command Demo" for graphics_nsb_nf as #g #g "trapclose [quit]"

'put pen down #g.gb "down; home" 'get pen position #g.gb "posxy x y"   'print crosshairs #g.gb "line ";x-10;" ";y;" ";x+10;" ";y #g.gb "line ";x;" ";y-10;" ";x;" ";y+10 'print the coords of home position #g.gb "color blue" #g.gb "\\"; x; " "; y   wait

[quit] close #g end code

Useful Functions
code format="lb" Place a useful function using this keyword here code