[gtkada] bitmap-handling with GtkAda
Frode Tennebø
frode at tennebo.com
Thu Nov 21 23:09:19 CET 2002
On Thursday 21 November 2002 17:28, Karl Ran wrote:
> >>But it seems to me that your clock updates the whole bitmap every
> >>second.
> >>
> >>That's what I'm trying to avoid......somehow :-/
> >
> >Why?
>
> Well, think of a BIG bitmap and a slooow connection from the program
> to the Xserver...
Pixmaps/bitmaps reside on the server, so unless you are redirecting the
dispay to another xserver across a slooow conection, this should not be
a problem.
What you want to do is create one window and one pix-/bitmap depending
on your need, draw the y*h to the pix-/bitmap, (*) do an XCopyArea to
blit the pix-/bitmap to the window, do an XCopyArea of the window minus
y pixles to the pixmap with an y pixles offset, draw the y*h to the
pix-/bitmap, wait the remainder of 100 ms, repeat from (*).
I do four such XCopyArea (BLITs) with clip-masks (sometimes complex
ones) of app. 900x900 pixles, 5 times-sec. And today it's the
complexity of the clip-mask which controlls the performance. Normally
it runs rather nicely.
I don't know if there is an existing GtkAda widget which does this, but
it would be a nice project. :)
-Frode
--
^ Frode Tennebø | email: frode at tennebo.com | Frode at IRC ^
| with Standard.Disclaimer; use Standard.Disclaimer; |
More information about the gtkada
mailing list