On 16/01/2011 14:55, Lee Privett wrote:
Hey people, has anyone come across any articles or information that allows the 
use of the line or circle command that draws to the screen accurately accoding 
the known dot resolution?

Let me explain

Say you have a maximum screen of 1280w800h, and a window#1 of 1280x800x0x0

Using a SCALE command of 800,0,0 allows drawing a line from 0 to 768 that 
reaches from the bottom to the top accurately but the x value is way off screen 
drawing to 1280

I have my own formulae for an x multiplication factor that seems to work well 
making squares appear square on the screen and circles appear circular on the 
screen as well, but not being a mathematics person my formulae is not very 
scientific and I have yet to check it on larger screens where any errors would 
be magnified.

It seems however to work on standard QL screen of 512x256 well. I was just 
wondering before I explore any further if anyone else had writen anything on it 
or if anyone had any comments?

Many thanks Lee Privett

-------------------------------------------------------------
Sent from my Laptop running XP
but emulating the QL using QPC2
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


This is something which I looked into long ago and is covered in the SBASIC/SuperBASIC Reference Manual

Try:

100 INPUT 'Screen Resolution Width :'!ScreenX
110 INPUT 'Screen Resolution Height :'!ScreenY
120 INPUT 'Window Width : ';wid
130 INPUT 'Window Height : ';hi
140 INPUT 'Scale : ';size
150 WINDOW wid,hi,32,16
160 PAPER 2:INK 7:CLS
170 SCALE size,0,0
180 Xratio=ScreenX/512:Yratio=ScreenY/256
190 line_diff=(101*Yratio/hi)*wid/('135.5041505'*Xratio)
200 LINE 0,0 TO size*line_diff,size
210 LINE 0,size TO size*line_diff,0

--
Rich Mellor
RWAP Services

http://www.rwapsoftware.co.uk
http://www.rwapservices.co.uk

-- Try out our new site: http://sellmyretro.com


_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to