No announcement yet.

Use Of The Line Statement

  • Filter
  • Time
  • Show
Clear All
new posts

  • Use Of The Line Statement

    Is there a better way to do the line statement in regards to coordinates. I’m trying to make some dice graphic in a certain position on the screen using SCREEN 12 640X480. I did try to do a point to point reference e.g LINE(0,0)-(0,0) and then LINE(639,479)-(639,479) to draw a line from the upper left of the screen to the lower right of the screen. I know how to use the Background fill and the color number (e.g. ,2, BF) it’s just figuring out the coordinates for a specific area of the screen. I get confused trying to place a square in that area I want. I’m just trying to figure a better way to understand it.

  • #2
    The full description of the WINDOW statement and its SCREEN option, in the PBDOS manual, might help you to figure out a more congenial and less arbitrary system coordinate system.

    For the 1-6 dots on each side of a die, it might also be easier to ignore the absolute positions of each dot on the screen or virtual screen, and work instead with the x,y distance of each dot from the center of the die.

    The DRAW statement might also help. With it you can code almost any shape & configuration of side in a single line and then simply set your starting position and DRAW. Unfortunately, DRAW commands do not recognize WINDOW SCREEN rescaling.

    And of course using bit files instead might be easier than any of the above, as many VB & PBWin programmers claim -- as long as you can make sure that no portion of your images will go off-screen with a PUT command.


    • #3


      Thanks for the information. I finally was able to figure out the line statement coordinates. I took me awhile but found out how to make the dice. Now all I need is to do the PSET for the dots on the dice. Thanks again.