[lazarus] TCanvas

Baeseman, Cliff Cliff.Baeseman at greenheck.com
Wed Jul 21 12:37:52 EDT 1999


I have a little project that displays the tcanvas draw rectangle problem.

Cliff

-----Original Message-----
From: michael at tfdec1.fys.kuleuven.ac.be
[mailto:michael at tfdec1.fys.kuleuven.ac.be]
Sent: Wednesday, July 21, 1999 11:44 AM
To: 'lazarus at miraclec.com'
Subject: RE: [lazarus] TCanvas




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.

_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list