Page 42 - Learn to Program - Basic-256
P. 42

Chapter 2: Drawing Basic Shapes.                                                  Page 26































        Sample Output 12: Draw a Triangle


                           line start_x, start_y, finish_x, finish_y


                           Draw a line one pixel wide from the starting point to the ending
                           point, using the current color.












               The next program is a sample of what you can do with many lines. It draws a
               cube on the screen.



             1      # cube.kbs - draw a cube
             2
             3      clg
             4      color black



                                                       © 2019 James M. Reneau (CC BY-NC-SA 3.0 US)
   37   38   39   40   41   42   43   44   45   46   47