[lazarus] TCanvas

michael at tfdec1.fys.kuleuven.ac.be michael at tfdec1.fys.kuleuven.ac.be
Wed Jul 21 12:33:05 EDT 1999




On Wed, 21 Jul 1999, Payne Thomas E CNIN wrote:

> I have been sticking with the examples under GTK, and have found some
> problems with scribble-simple (section 23) that I belive are with the GDK
> port to FPC.
> 
> I have placed debugging writes in pascal and printfs in C, and am getting
> very different numbers.  
> 
> I was specifically looking at (PGdkEventExpose)Event^.area.height in the
> expose_event function
> & (PGdkEventMotion)Event^.state in motion_notify_event
> 
> I need some help beyond this point!!!

We have noticed this bug, and the problem is a compiler bug; the pascal
compiler aligns the sub-records differently than C does; when accessing 
records generated By C routines, this of course gives a problem;

specifically the EventExpose.area suffers from this problem;
we are working on it. When it is fixed, we'll let you know.

It is possible that this is at the basis of the whole TCanvas problem,
but I would have to investigate that.

As a workaround you can typecast the whole thing to a array of word;
words 6,7,8,9 are then the elements of the 'area' sub-record.

Not all records suffer from this problem, just records with sub-records 
that have elements of size <4 in them before the sub-record.

As soon as there is any news about this, I'll let you know.

Michael.






More information about the Lazarus mailing list