Bisma Jayadi wrote:
I'm the person who reported the supposed bug. But after the explanation of a peer, i agreed that was a bug/misbehavior of Delphi. So i'm favorable as not considerating as a bug but as a "difference" that should be considered when porting a Delphi app. I think that we should follow Delphi as close as possible (I'm porting a rather complex Delphi software) but when we found that _clearly_ is a bug or misbehavior, or cannot be done in a cross platform way, we should be free to do our way (what we think is the best way).

Agree. It's a bug of Delphi, not Lazarus. So, instead of "fixing" it to be compatible with Delphi, I prefer to report it as bug to Borland/CodeGear QC. Obviously Rectangle(0,0,1,1) must draw a 2x2 rectangle as it uses 2 pixels, and Rectangle(0,0,0,0) must draw a 1x1 rectangle as it uses 1 pixel.

However, this incompatibility had forced me to do lots of IFDEFs when porting some Delphi application to Lazarus a while ago. :(

Idea: instead of IFDEFs everywhere you can also try to define an IFDEFed 
constant RECT_OFFSET [or a shorter name], being either 0 or 1, and add it 
everywhere where needed.

BTW Imho I think the win32/Delphi approach reduces the overall number of +1's 
and -1's (in particular in the implementation of API routines), but I agree 
that the Laz interpretation is way less confusing for developers using Laz.

Regards,

Bram

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

Reply via email to