[Qt] Magnifier on OS X
Hess, Philip J
pjhess at purdue.edu
Fri Feb 16 20:11:22 CET 2007
Den,
Since the declarations are different in FPC RTL, the test code should have worked, right?
Or is TRect different from Rect?
Thanks.
-Phil
-----Original Message-----
From: qt-bounces at lazarus.freepascal.org [mailto:qt-bounces at lazarus.freepascal.org] On Behalf Of Den Jean
Sent: Friday, February 16, 2007 2:10 PM
To: Items specific to the Qt widget set
Subject: Re: [Qt] Magnifier on OS X
On Friday 16 February 2007 19:49, Hess, Philip J wrote:
> Den,
>
> I'm not sure if I know what you mean.
LCL should use the correct Rect for Darwin
in FPC source dir:
./rtl/macos/macostp.inc:
Rect = record
case INTEGER of
0: (
top: INTEGER;
left: INTEGER;
bottom: INTEGER;
right: INTEGER;
);
1: (
topLeft: Point;
botRight: Point;
);
end;
which is different from
./rtl/win32/wininc/struct.inc:
RECT = record
case Integer of
0: (Left,Top,Right,Bottom : Longint);
1: (TopLeft,BottomRight : TPoint);
end;
>
> My test code passes in a pointer to a TRect.
>
> Thanks.
>
> -Phil
>
>
> -----Original Message-----
> From: qt-bounces at lazarus.freepascal.org
> [mailto:qt-bounces at lazarus.freepascal.org] On Behalf Of Den Jean Sent:
> Friday, February 16, 2007 1:48 PM
> To: Items specific to the Qt widget set
> Subject: Re: [Qt] Magnifier on OS X
>
> On Wednesday 14 February 2007 18:54, Felipe Monteiro de Carvalho wrote:
> > Hello,
> >
> > I am bringing the subject to the mailling list, as it probably
> > interrests everyone.
> >
> > On 2/14/07, Hess, Philip J <pjhess at purdue.edu> wrote:
> > > I've attached a small program that displays screen dimensions. On
> > > Windows it displays 1024 x 768. On OS X it displays 768 x 1024, so it
> > > looks like the dimensions are reversed. That would explain the odd
> > > screen capture.
>
> snippet from Qt's qrect.h
>
> #if defined(Q_OS_MAC)
> int y1;
> int x1;
> int y2;
> int x2;
> #else
> int x1;
> int y1;
> int x2;
> int y2;
> #endif
>
> So if you use the pascalify trick, the pascal definition of rect
> should be different on Mac.
>
> > Ok, my Qt code is obviously the same on all platforms, so is that
> > expected???
> >
> > At a glance, it looks like a Qt bug to me.
> >
> > A very good question is: Is that reversed on all Mac os x computers?
> > Or your setup has something special (like libraries versions, donĀ“t
> > know), or maybe there is a reason I miss why the coordinates are
> > inversed on mac os x?
>
> _______________________________________________
> Qt mailing list
> Qt at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/qt
> _______________________________________________
> Qt mailing list
> Qt at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/qt
_______________________________________________
Qt mailing list
Qt at lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/qt
More information about the Qt
mailing list