BB___TURN

=TURN= toc

Description
> For use with graphics windows and graphicboxes, TURN changes the direction of the pen by a number of degrees. The angle is added to the current direction and can be positive or negative. The direction the pen is pointing is useful when using the command.

Syntax
//This command is NOT case sensitive//. Using a literal angle value: Using a variable angle value: A = -45
 * 1)  - a graphics window
 * 2)  - a 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; north; go 50"

for i = 1 to 7 #g "turn -45" #g "go 50" next i

wait

[quit] close #g end code

An example of the command in a graphicbox and using a variable angle value. 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; north; go 50" a=-45 for i = 1 to 7 #g.gb "turn "; a       #g.gb "go 50" next i

wait

[quit] close #g end code

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