On 16/01/2011 15:39, gdgqler wrote:
On 16 Jan 2011, at 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?
As it happens I am just in the process of looking at this problem. The problem 
is twofold. First the pixels may not be square. Indeed they differ in shape 
between a Q40/60  and  QPC2. Different sizes of Aurora give different shapes 
too. The second problem is that the graphics coordinates have a different 
effective size from pixels. I wanted to draw lines using graphics between two 
points defined by pixel positions. This is the reverse of trying to annotate 
diagrams drawn by the graphics commands. SCALE x,y,a,b allows that. To draw 
lines between two pixel positions is possible by setting SCALE h,0,0, where h 
is the height of the window in pixels. The graphics coordinates of pixel 
position x, y become x/1.35, h-y. This seems to work on Q60 and QPC2.

Circles and squares on a Q60 are ellipses and oblongs on QPC2 and differing 
sizes of screen with Aurora. I found by trial and error values that made 
circles circular and oblongs square. I don't know of any other method. It 
depends on the shape of pixels and I don't know where that is defined.

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


From memory, my program should take account of the different shape of pixels....

--
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