Re: [gtk-list] Re: Using drawRGB with selective transparencies




> Your best bet is to simply keep a GdkRGB buffer around, or the info to
> recreate it; do the points on the client side, then recopy the entire
> buffer.

Thank you for your most timeley answer. This raises one more
question that may be entrieley basic but a good answer escapes me
right now (+ I'm at work and all my Linux stuff is at home):

Is there any easy way to convert an aleady existing (and
drawn-on) drawing area (with a backing pixmap) into a RGB buffer
so the RGB buffer contains the picture you've drawn? Just thinking
about it, it would seem that the (backing) pixmap data should
be convertable to a RGB buffer without too many problems, but I've
never tried this (and haven't even looked at it).

Thanks again
--> R




Havoc Pennington <rhp@zirx.pair.com> on 07/05/99 04:10:41 PM

Please respond to gtk-list@redhat.com

To:   gtk-list@redhat.com
cc:
Subject:  [gtk-list] Re: Using drawRGB with selective transparencies



On Mon, 5 Jul 1999 robert_gasch@peoplesoft.com wrote:
> in my program, I first draw on a drawing area
> using drawRGB. I would then like to overlay
> this drawing area with some selective points,
> also using drawRGB. The problem is that the
> points I read are in no special order and thus
> all over the place. Right now I'm doing the following

Your best bet is to simply keep a GdkRGB buffer around, or the info to
recreate it; do the points on the client side, then recopy the entire
buffer.

If you want to do it on the server side, then just use gdk_draw_point()
and use gdk_rgb_gc_set_foreground() to set the GC color. It's slow but if
you have only a few points probably faster than recopying the whole RGB
buffer. If the points are the same color, you can gdk_draw_points() to
send them all at once.

Havoc



--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]