Re: How to render/update a small rectangle of GdkImlibImage in aGnomeCanvasImage ?
- From: Percy Zahl <zahl fkp uni-hannover de>
- To: Federico Mena Quintero <federico nuclecu unam mx>, "gnome-list gnome org" <gnome-list gnome org>
- Subject: Re: How to render/update a small rectangle of GdkImlibImage in aGnomeCanvasImage ?
- Date: Tue, 03 Aug 1999 10:52:29 +0200
Federico Mena Quintero wrote:
> > I need a fast update of small, rectangular region of a GdkImlibImage,
> > which is displayed via a GnomeCanvasImageItem.
> Application code should never ever call the
> gnome_canvas_request_redraw() and update() family of functions. These
> are meant to be used only by canvas item implemenations.
> You should simply tell the image item that the image changed:
> gnome_canvas_item_set (gitem,
> "image", gimg,
I see. It´s Ok so far, but I can not be satisfied to redraw a 800x800 or
even bigger Image every few seconds I got a new Line of data...
It is nessesary to see the aquired data online.
I´m rewriting my STM/AFM (Scanning Tunneling Microscopy/Atomic Force
Software from the libxforms-0.88...
My previously solution was a selfbuild xforms object, where I do my own
for (supporting 8/15/16/24bit) and palette mapping using the xlib
(with MIT-SHM support).
My object has some very fast inline functions to set single pixels/lines
uses calls like
XPutImage(disp, win, gc, ximage, xs,ys, x0+xs,y0+ys, w,h);
XShmPutImage(disp, win, gc, ximage, xs,ys, x0+xs,y0+ys, w,h, False);
to refresh the image... after I changed some data in ximage...
> This will redraw the whole image. Right now there is no way to tell
> it about a small change, though. This is really not possible with
> imlib, since its dithering algorithm requires a recalculation of the
> whole image.
> Now that GnomeCanvasImage supports GdkPixbuf, it would make sense to
> have a function to notify it about a local change. I'll look into it.
If there is a nice and fast way solving my problem, I´ll be very
happy to forget about xlib hacking....
PS: Who knows how gimp does the drawing/refreshing in a area ?
Email: email@example.com // \\ www.gnome.org
http://www.fkp.uni-hannover.de /( )\ www.gnu.org
Institut f"ur Festk"orperphysik, Appelstr. 2, D-30167 Hannover
Tel.Labor: +49 (0)511/762-4825, Fax: -4877
] [Thread Prev