SIZE
Jump to navigation
Jump to search
Description
- In graphics windows and graphic-boxes, SIZE sets the size of the pen in pixels. By default, the pen is set to size 1. The pen size controls the width of drawn lines and shape outlines.
Syntax
- This command is NOT case sensitive.
- Using a literal number:
- #handle "size S" - a graphics window
- #handle.ext "size S" - a graphicbox
- Using a variable number:
- #handle "size "; S
- #handle.ext "size "; S
- S is a number of 1 or more pixel width.
Hints
- Here is a list of commands that affect the pen position or status:
Example
An example of the command in a graphics window.
nomainwin
WindowWidth=400
WindowHeight=300
open "Command Demo" for graphics_nsb_nf as #g
#g "trapclose [quit]"
'place pen then put it down
#g "goto 100 100; down"
'set pen size
#g "size 3"
'draw a box
#g "box 200 200"
'reset pen size and do some fun stuff
#g "size 1"
#g "up; goto 100 100; down; goto 300 30; goto 200 100"
#g "up; goto 200 200; down; goto 300 30"
wait
[quit]
close #g
end
An example of the command in a graphicbox using variable values.
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
#g.gb "down; home"
'set pen size
pS=5
'set radius of circle
r=100
for i = 1 to 4
#g.gb "size "; pS
'draw a circle
#g.gb "circle "; r
r=r-2*pS
pS=pS-1
next i
wait
[quit]
close #g
end
Useful Procedures
' Place a useful function or sub using this keyword here