[Qt] qt tshapes arm] bindings question

Terry Kemp klc at klc.net.nz
Thu Jun 19 22:57:52 CEST 2008


On Thu, 2008-06-19 at 15:05 +1200, Terry Kemp wrote:
> > 
> > Maybe some fpc troubles? We are calling translate so:
> > 
> > TQtDeviceContext(DC).translate(P.X, P.Y);
> > 
> > where P.X and P.Y are integers but translate arguments are doubles. So 
> > maybe fpc wrongly converts integers to double? Can you check what do you 
> > get in TQtDeviceContext.translate. I mean arguments dx and dy.
> > 
> > Btw, what fpc version do you use?
> > 
> > Best regards,
> > Paul Ishenin.
> > 
> 

One last thing before I give up, move to the dark side and learn C++

I started looking at the bindings and wanted to see what qreal was.
Me thinks this could be my problem...

typedef qreal
Typedef for double on all platforms except for those using CPUs with ARM
architectures. On ARM-based platforms, qreal is a typedef for float for
performance reasons.

Is this /easily/ changed in the bindings Den? or shall I manually go
through and modify the calls to see if this works.

Thanks

Terry

> OK, I will check the translate args.
> here it is... all OK
> 
> [WinAPI SetWindowOrgEx] DC: 40F91380 NewX: -62 NewY: -1
> integer = 4
> pointer = 4
> cardinal = 4
> [WinAPI SetWindowOrgEx] MATRIX dx:  4.05437852603306E-308
> [WinAPI SetWindowOrgEx] MATRIX dy:  4.05437905653200E-308
> [WinAPI SetWindowOrgEx] MATRIX m11:  4.05437905238748E-308
> [WinAPI SetWindowOrgEx] MATRIX m12:  4.05437852603306E-308
> [WinAPI SetWindowOrgEx] MATRIX m21:  4.05437852603306E-308
> [WinAPI SetWindowOrgEx] MATRIX m22:  4.05437905238748E-308
> Trace: > [WinAPI GetWindowOrgEx]
> Trace: < [WinAPI GetWindowOrgEx] QMATRIX_DX 4.04931968806739E-308
> Trace: < [WinAPI GetWindowOrgEx] QMATRIX_DY4.06088085163552E-308
> Trace: < [WinAPI GetWindowOrgEx] Result=(x=0,y=0)
> [WinAPI SetWindowOrgEx] DC: 40F91380 P.X: 0 P.Y: 0
> [WinAPI SetWindowOrgEx] OldPoint: -4133068C
> TQtDeviceContext.drawRect() x1: 62 y1: 1 w: 10 h: 10
> TQtDeviceContext.translate() dx:  6.20000000000000E+001 dy:  1.00000000000000E+000
> TQtDeviceContext.drawRect() x1: 0 y1: 0 w: 12 h: 12
> ***** [WinAPI TQtWidgetSet.IntersectClipRect] 
> Trace:> [WinAPI SelectObject] DC=40F91380 GDIObj=40EEAE40
> TQtDeviceContext.pen() TQtDeviceContext.setPen() TQtDeviceContext.pen() Trace:< [WinAPI SelectObject] Result=40EEA900 ObjectType=Pen
> [WinAPI MoveToEx] DC:40F91380 X:0 Y:0
> 
> 
> I'm compiling the lazarus project with latest svn 
> fpc-arm-2.3.1 (softfloat eabi)
> 
> This is the only problem I have.
> 
> It still seems strange the calls to matrix_dy etc return crazy (float)
> numbers. I will see what they are in hex. there is a pattern there.
> 
> thanks again
> 
> Terry 
> 
> _______________________________________________
> Qt mailing list
> Qt at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/qt
> 
> 




More information about the Qt mailing list