Graphics drawing.
Draw a straight line.
line(0,0)-(100,100),col(2)
Draw a straight line from coordinates (0,0) to (100,100) on Graphic screen.
About color specification.
In the old style Basic of
8,16 colors, the color specification is like
this,
line(0,0)-(100,100),2
but in 'Basic for Android', to convert to full
color code
line(0,0)-(100,100),col(2)
write as this way.
col(2) is red. The correspondence between each
Color-code and Color is as follows.
0: black 1: blue 2: red 3: purple: 4:
green 5: cyan 6: green 7: white
To get a brighter color, use this value plus
8.
Draw a circle
circle(100,200),80,col(4)
The 'circle' statement draw a circle at the specified
radius[this example 80]
at around the specified coordinates[this
example at(100,200)].
The example is green circle.
Fill the enclosed area.
Let's paint inside of the
previous circle.
circle(100,200),80,col(4)
paint(100,200),col(1)
The 'paint' statement fill the inside of the boundary
from the specified coordinates.
In this example, the inside of the circle are
filled in blue.