Try again: GdkPixmap
- From: Derek Simkowiak <dereks kd-dev com>
- To: gtk-devel-list redhat com
- Subject: Try again: GdkPixmap
- Date: Tue, 21 Dec 1999 12:51:57 -0800 (PST)
Regarding the GtkText widget, I was having a brain-fart yesterday
and for some reason thought the GdkRGB was a drawable. Sorry about that.
I'm a novice X programmer, so please have patience with me.
My next design attempt is with the GdkPixmap. I'd like to render
the text offscreen, into a GdkPixmap, and then simply copy the pixmap into
the visible text window. I plan to cache one screen's worth of text (in
rendered pixmap form) both upwards and downwards, so verical scrolling
will be smooth.
Then, to implement horizontal (and vertical) scrolling, I'll just
need to clip the offscreen pixmap to the viewable window.
Unfortunately, I don't understand how the X architecture relates
to the video hardware. My thought is that rendering to a GdkPixmap first
will give me a double-buffered effect, because I'm copying from an
offscreen GdkPixmap to an onscreen GdkWindow. This gives me hope that I
can implement smooth vertical scrolling (as in MS Internet Explorer). Is
this way off base?
My questions are: how fast is a GdkPixmap to GdkWindow copy?
Fast enough? And, how much memory does a GdkPixmap take? If the user has
a full-screen GtkText widget (with the above archictecture), and they
maximize the widget on a 1024x768 display (at, say, 16 or 24 bit color)
how much RAM would the 3076x768 pixmap buffer take up?
As always, all help is greatly appreciated.
Thanks Again,
Derek Simkowiak
dereks@kd-dev.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]