Hi,

A bug was reported that TCanvas.Rectangle is incompatible to Delphi, but
somebody suggested that this was rather a Delphi bug.

For the complete story see:
http://www.freepascal.org/mantis/view.php?id=8342

In a note I wrote:
The canvas routines in Delphi are inspired by the winapi for device
contexts. See http://msdn2.microsoft.com/en-gb/library/ms533879.aspx [^]
for the winapi documentation. It states that "The rectangle that is
drawn excludes the bottom and right edges."

Somewhere else this is explained as nRightRect-nLeftRect should be
considered as width.

It is an easy to make this method work Delphi compatible by removing the
+1 in TWin32WidgetSet.Rectangle. But I hesitate to do, because I don't
know how many Lazarus code depends on the Delphi incompatibility.

The questions to be answered are:
Should LCLIntf.Rectangle do the same as Windows.Rectangle?
Should TCanvas.Rectangle(0,0,1,1) draw an 1x1 (as Windows.Rectangle
does) rectangle or a 2x2 rectangle (as Lazarus does currently)?
What is the current behavior for other widget sets?

So what do you think?

Vincent

_________________________________________________________________
archive: http://www.miraclec.com/list_archives/lazarus-developer

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to