Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-07

[TCanvas]

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Shane Miller

OK, please look at CVS (just updated).

I am using the gdkwindow and I draw everything on a pixmap then I do a gdk_draw_pixmap(pixmap,gc,widget^.window,x,y,x,y,w,h);

That should work, but it doesn't

PLEASE, someone will be looking at it the rest of the day.

Please give me some ideas. The code is basically in 3 procedures in GTKINT.PP

ExposeEvent, ConfigureEvent and DrawFillRect.

DrawFillRect is called by Graphics.pp which in turn is called by mail.pp whenever the form redraws.

Any ideas would be helpful.

Shane

Reply by email

Michal Bukovjan

This is what I found.
If you got the GC, you may start drawing using functions like gdk_draw_line, etc. as defined in gdk.h, especially in gdkdraw.c.

I think the GC object has also properties like font, line style, fill style, etc., much like windows. Functions for setting these are found in gdkgc.c.

I haven't tested this but this might provide a clue.

Also, the GtkDrawable window is a GdkWindow with some attributes set. I think there is a macro of some sort that checks this.

So much I have learned,

Regards,

Mike

"Shane Miller" wrote
Anyone have any detail on how I would go about writing to the canvas or

drawing area of a gtkwidget without using the drawingarea widget?

I know I can get a gdkwindow from doing fWindow := PgdkWindow(pgtkwidget(widget)^.window); but what do I do with that window? I can get it's gdkgc but I don't have

ANY idea what to do.

Show quoted text 9 lines
Thanks Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

Reply by email

Baeseman, Cliff

Is the gtk engine throwing any errors?

Also you might try to block the fixed widget and see if it might be covering something up.

Cliff

Earlier message 33 lines
-----Original Message----- From: Shane Miller Sent: Tuesday, July 20, 1999 11:43 AM To: Subject: Re: [[lazarus] TCanvas] OK, please look at CVS (just updated). I am using the gdkwindow and I draw everything on a pixmap then I do a gdk_draw_pixmap(pixmap,gc,widget^.window,x,y,x,y,w,h); That should work, but it doesn't PLEASE, someone will be looking at it the rest of the day. Please give me some ideas. The code is basically in 3 procedures in GTKINT.PP ExposeEvent, ConfigureEvent and DrawFillRect. DrawFillRect is called by Graphics.pp which in turn is called by mail.pp whenever the form redraws. Any ideas would be helpful. Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Michal Bukovjan

This is what I found.
If you got the GC, you may start drawing using functions like gdk_draw_line, etc. as defined in gdk.h, especially in gdkdraw.c.

I think the GC object has also properties like font, line style, fill style, etc., much like windows. Functions for setting these are found in gdkgc.c.

I haven't tested this but this might provide a clue.

Also, the GtkDrawable window is a GdkWindow with some attributes set. I think there is a macro of some sort that checks this.

So much I have learned,

Regards,

Mike

"Shane Miller" wrote
Anyone have any detail on how I would go about writing to the canvas or

drawing area of a gtkwidget without using the drawingarea widget?

I know I can get a gdkwindow from doing fWindow := PgdkWindow(pgtkwidget(widget)^.window); but what do I do with that window? I can get it's gdkgc but I don't have

ANY idea what to do.

Show quoted text 9 lines
Thanks Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

Reply by email

Michal Bukovjan

This is what I found.
If you got the GC, you may start drawing using functions like gdk_draw_line, etc. as defined in gdk.h, especially in gdkdraw.c.

I think the GC object has also properties like font, line style, fill style, etc., much like windows. Functions for setting these are found in gdkgc.c.

I haven't tested this but this might provide a clue.

Also, the GtkDrawable window is a GdkWindow with some attributes set. I think there is a macro of some sort that checks this.

So much I have learned,

Regards,

Mike

"Shane Miller" wrote
Anyone have any detail on how I would go about writing to the canvas or

drawing area of a gtkwidget without using the drawingarea widget?

I know I can get a gdkwindow from doing fWindow := PgdkWindow(pgtkwidget(widget)^.window); but what do I do with that window? I can get it's gdkgc but I don't have

ANY idea what to do.

Show quoted text 9 lines
Thanks Shane _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.miraclec.com/list_archives/lazarus

____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.

Reply by email