On 06/08/07, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:
>
> Actually this is debatable. Where does the pixel starts matematically?
> At it's center?
>
> If you have a square from (0, 0) to (1, 1), considering the center of
> the pixels, the square will have only a 1x1 size =)
Seeing that our company's business is mathematics, I thought I would
bug some of the math geniuses with this. Boy did I confuse them with
my arguments! :)
The problem comes in when you compare coordinates on graph paper to
coordinates on a screen. My argument was that if I ask the computer
to draw a pixel at (0,0) and (1,1) I get two pixels on the screen, so
Rectangle(0, 0, 1, 1) should give me a 2x2 square.
Because graph paper doesn't reference the block between lines, but
rather the lines itself, (0, 0, 1, 1) only covers a single square, so
gives you a 1x1 square.
In the end I was told that mathematically the graph paper is the
correct way of looking at it and Rectangle(0, 0, 1, 1) should only
populate a single pixel on the screen. I was told to rather think of
pixels as lying on the lines of graph paper instead of being the
blocks between the lines.
I guess I need to adjust fpGUI's Canvas.Rectangle() again! ;-)
I think implementing Canvas.Rectange with parameters (x, y, width,
height) will cause a lot less confusion.
Regards,
- Graeme -
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives