[lazarus] TCanvas handle

Marc Weustink weus at quicknet.nl
Tue Nov 16 17:13:32 EST 1999


At 15:24 16-11-99 -0600, shane wrote:
>I believe someone mentioned that they felt that the canvas' handle should
point to a GC instead of the widget it points to now.  I tend to agree with
the small amount of investigation I spent on the subject.

That was me.

>
>I assume the GC will be gooten from the function call GETDC (which will
call getgc for gtk).  
>FHandle in TCanvas points to a HFont which is a longword (or something
like that).  I assume we'll simply type-cast it as a GC and it'll work in
gtkinterface.

I already started some experiments/implements on that. Just a GC isn't
enough. You also need a window. Just look at the code I've committed for
GetDC in gtkwinapi.inc

>Is anyone planning on working on this?

Yes, From the results I've now it looks promising.

>I see someone posted the bitmap code but there are a ton of errors because
a new VCLGLOBALS wasn't posted that included such things as CSBITMAP and
the like.  Whomever did this, please fix it so it compiles again.  If you
need help, let us know.

EEhhh... I guess I committed some changes to much. As soon as I've cleaned
up the mess I'll commit the rest. I think this part of bitmap code (just
the canvas) was also from me.
This all was an attempt to get mwEdit to accept text and draw lines and
stuff, and add some mere WINAPI stuff. The raw ideas for the bitmap canvas
where accidently commited as well. 
To fix this (I guess by head), simply comment out all csBitmap code in
CreateComponent (gtkobject.inc)


>I would like to get a snapshot of what is being worked on so we can move
forward with getting this editor working.   We have a lot of functions we
need to add.

>Please let me know if the getdc functions are being written and if the
canvas stuff is being re-written to support fhandle.  

This moment I'm working on the DC/Canvas/winapi stuff.

>I have to look over the new setup we have with the new include files.  I
haven't had time to investigate them yet to see if this is a better way.


>
>Before making a drastic change like this, I think we should disuss it a
bit more........  :-)

Ok, OK it got a bit out of hand. It were all little changes, but in the end
its huge.

It started with mwEdit problems, then fonts came, then DC then Canvas.
Everything just comes together. Maybe I did some things to fast.

Marc







More information about the Lazarus mailing list