Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Luiz Americo Pereira Camara
zel...@holobit.net escreveu: Quoting Luiz Americo Pereira Camara : Mattias Gaertner escreveu: On Tue, 26 Oct 2010 17:31:48 +0200 zeljko wrote: One note: IntersectRect in lazarus worked OK until we decided to use Types.IntersectRect, old implementation from GraphType looks much better th

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Felipe Monteiro de Carvalho
On Tue, Oct 26, 2010 at 8:05 PM, wrote: > No, why ? I've fixed problems inside widgetsets.Let's propose patch for > improving Types.IntersectRect(). I already fixed this in FPC 2.5.1+ Please verify. -- Felipe Monteiro de Carvalho ___ fpc-devel mailli

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
Quoting Luiz Americo Pereira Camara : Mattias Gaertner escreveu: On Tue, 26 Oct 2010 17:31:48 +0200 zeljko wrote: One note: IntersectRect in lazarus worked OK until we decided to use Types.IntersectRect, old implementation from GraphType looks much better than current fpc one. Then

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
Quoting Mattias Gaertner : On Tue, 26 Oct 2010 17:31:48 +0200 zeljko wrote: On Tuesday 26 October 2010 16:57, Sergei Gorelkin wrote: > > Well, maybe. For me, it is rather hard to think about the opposite - that a > const may be passed *not* by reference - due to long-term Delphi/Windows

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Luiz Americo Pereira Camara
Mattias Gaertner escreveu: On Tue, 26 Oct 2010 17:31:48 +0200 zeljko wrote: One note: IntersectRect in lazarus worked OK until we decided to use Types.IntersectRect, old implementation from GraphType looks much better than current fpc one. Then it is probably better to undo the chan

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Mattias Gaertner
On Tue, 26 Oct 2010 17:31:48 +0200 zeljko wrote: > On Tuesday 26 October 2010 16:57, Sergei Gorelkin wrote: > > > > > Well, maybe. For me, it is rather hard to think about the opposite - that a > > const may be passed *not* by reference - due to long-term Delphi/Windows > > experience. > > > > B

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Michael Van Canneyt
On Tue, 26 Oct 2010, Sergei Gorelkin wrote: Jonas Maebe пишет: With a little testing, here are two facts: 1) Delphi 7 also shows this bug. 2) Windows.IntersectRect() does not show it, allowing 'misuses'. So, whoever wrote the FPC function, must have been trying really hard to achieve bug-t

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
On Tuesday 26 October 2010 16:57, Sergei Gorelkin wrote: > > Well, maybe. For me, it is rather hard to think about the opposite - that a > const may be passed *not* by reference - due to long-term Delphi/Windows > experience. > > But, after all, Types.IntersectRect and surrounding stuff were intro

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Sergei Gorelkin
Jonas Maebe пишет: With a little testing, here are two facts: 1) Delphi 7 also shows this bug. 2) Windows.IntersectRect() does not show it, allowing 'misuses'. So, whoever wrote the FPC function, must have been trying really hard to achieve bug-to-bug compatibility with Delphi... or simply cop

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Jonas Maebe
On 26 Oct 2010, at 16:12, Sergei Gorelkin wrote: zeljko пишет: On Tuesday 26 October 2010 15:13, Felipe Monteiro de Carvalho wrote: On Tue, Oct 26, 2010 at 3:14 PM, zeljko wrote: No, I've opened an issue and Jonas closed with good explanation - we had misusage of IntersectRect in gtk/gtk2

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Sergei Gorelkin
zeljko пишет: On Tuesday 26 October 2010 15:13, Felipe Monteiro de Carvalho wrote: On Tue, Oct 26, 2010 at 3:14 PM, zeljko wrote: No, I've opened an issue and Jonas closed with good explanation - we had misusage of IntersectRect in gtk/gtk2 interfaces (I've fixed both) ... so not bug. I guess

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
On Tuesday 26 October 2010 15:13, Felipe Monteiro de Carvalho wrote: > On Tue, Oct 26, 2010 at 3:14 PM, zeljko wrote: > > No, I've opened an issue and Jonas closed with good explanation - we had > > misusage of IntersectRect in gtk/gtk2 interfaces (I've fixed both) ... so > > not bug. > > I guess

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Felipe Monteiro de Carvalho
On Tue, Oct 26, 2010 at 3:14 PM, zeljko wrote: > No, I've opened an issue and Jonas closed with good explanation - we had > misusage of IntersectRect in gtk/gtk2 interfaces (I've fixed both) ... so not > bug. I guess it depends on how you see it. Anyway, the solution would be trivial, just store

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
On Tuesday 26 October 2010 14:02, Felipe Monteiro de Carvalho wrote: > IMHO it is > > > 2.FPC Types.IntersectRect() have bug No, I've opened an issue and Jonas closed with good explanation - we had misusage of IntersectRect in gtk/gtk2 interfaces (I've fixed both) ... so not bug. zeljko ___

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
On Tuesday 26 October 2010 14:02, Felipe Monteiro de Carvalho wrote: > IMHO it is > > > 2.FPC Types.IntersectRect() have bug And it's very ugly :) I've grepped complete lazarus tree for such "misusage" of IntersectRect, but found only same problematic code in gtk dir and fixed that. zeljko _

Re: [fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread Felipe Monteiro de Carvalho
IMHO it is > 2.FPC Types.IntersectRect() have bug -- Felipe Monteiro de Carvalho ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT

2010-10-26 Thread zeljko
Hi all, Someone reported bug in gtk2lcl which crashes lazarus ide. I've found that intersectRect usage from types (from r 27870) makes that. So imagine next code: var R, SrcRect: TRect; begin R := Rect(0, 0, 22, 22); SrcRect := Rect(0, 0, 24, 24); Types.IntersectRect(R, SrcRect, R); e