ScreenTest drawLine arguments?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ScreenTest drawLine arguments?

stansbuj
I'm confused by some of the drawLine calls in Main.jack in Project 12 ScreenTest.

        do Screen.drawLine(280,90,345,35);        // roof
        do Screen.drawLine(345,35,410,90);        // roof

How can the x1 argument be 280 or 345 when there are only 256 rows?

Jack
Reply | Threaded
Open this post in threaded view
|

Re: ScreenTest drawLine arguments?

cadet1620
Administrator
stansbuj wrote
I'm confused by some of the drawLine calls in Main.jack in Project 12 ScreenTest.

        do Screen.drawLine(280,90,345,35);        // roof
        do Screen.drawLine(345,35,410,90);        // roof

How can the x1 argument be 280 or 345 when there are only 256 rows?

Jack
x values are horizontal coordinates; y values are vertical coordinates. There are 512 columns, so valid values for x coordinates are 0 <= x < 512.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: ScreenTest drawLine arguments?

stansbuj
Thanks Mark! For some reason, that always seems to trip me up. But I got it working now. Whew! Project 12 took the most time, by far (and I've done OS work before!)

Great book and a great set of projects!

Jack