Drawing widget parts off-screen
- From: Olivier Guilyardi <ml xung org>
- To: gtk-app-devel-list gnome org
- Subject: Drawing widget parts off-screen
- Date: Thu, 28 Aug 2008 12:59:32 +0200
Hi,
For a specialized (audio pattern) editor I'm currently drawing everything on a
off screen pixmap, and calling gdk_draw_drawable() to copy the needed areas on
expose events into a drawing area's GdkWindow.
I would like to draw some widget parts (a ruler actually) using the
gtk_paint_*() methods into this editor. However, since the whole drawing process
is made off screen using some sort of layers, I can't draw directly on the
GdkWindow. I would prefer to draw the widget parts on the off-screen pixmap.
However, all the gtk_paint_*() functions need a GdkWindow to draw on. Funny
thing, I've tried to pass my GdkPixmap to gtk_paint_box(), it issued an "invalid
cast from `GdkPixmap' to `GdkWindow'", but it did draw ;)
Anyway, I sense this isn't the right thing to do. I also thought about having an
"off-screen" (never shown) GdkWindow instead of my GdkPixmap. This should work,
since all the gdk drawing functions I use expect a GdkDrawable. Is it the right
way to do this? Isn't drawing on a GdkWindow heavier, because it implies
interactions with X11 (or Quartz, whatever)?
Regards,
--
Olivier Guilyardi / Samalyse
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]