NORTH
Jump to navigation
Jump to search
Description
- In a graphics window or graphic-box, NORTH sets the pen position to straight up, which is normally North on a map. But, NORTH is not 0 degrees; it is 270 degrees with this command. Pointing right, or east, is 0 degrees. Pointing down, south, is 90 degrees. Pointing left, or west, is 180 degrees. The pen points North by default. See example.
- To change the pen direction, use the "turn A" command.
Syntax
This command is NOT case sensitive.
- #handle "north" - in graphics window
- #handle.ext "north" - in graphicbox
Hints
- Here is a list of commands that affect the pen position or status:
Example
An example of the command in a graphics window showing the pen points north by default.
nomainwin
WindowWidth=400
WindowHeight=300
open "Command Demo" for graphics_nsb_nf as #g
#g "trapclose [quit]"
'put pen down
#g "down; home"
#g "go 50"
wait
[quit]
close #g
end
An example of the command in a graphicbox.
nomainwin
WindowWidth=400
WindowHeight=300
graphicbox #g.gb 2, 2, 390, 270
open "Command Demo" for window_nf as #g
#g "trapclose [quit]"
'put pen down
'by default, pen is pointing up (north)
#g.gb "down; home"
'turn pen
#g.gb "turn 90"
#g.gb "go 100"
#g.gb "north; go 50"
wait
[quit]
close #g
end
Useful Procedures
' Place a useful function or sub using this keyword here