[Gambas-user] DrawingArea problems

Christopher Brian Jack brian at ...1334...
Wed Oct 11 17:53:52 CEST 2006


On Wed, 11 Oct 2006, Timothy Marshal-Nichols wrote:

> I have found that there are two reasons for using a buffer like this:
>
> 1. If you have lots of small objects to draw it can look better as you
> do not see all the background objects draw over the foreground objects.
> You reduce the screen flicker as objects are drawn.
>
> 2. It can be faster, again if you have a lot of objects to draw. Drawing
> to memory is faster than drawing to the screen. So if background objects
> get covered by foreground objects. You can speed things up if you draw a
> more complex picture or image to the screen.
>
> Both these points depend on what you are drawing. They are not true in
> all cases. So you need to experiment.

You can also do wholesale effects on the buffer data more easily than to
the screen and it's also the only way to use a DR (Dirty Rectangle) render
algorithm without flicker.

> The other point I would make is that I would make the backBuffer an
> Image. An Image is stored in memory while a Picture is stored on the X
> server.

Hmm...  There was something a Picture was able to do that Images couldn't.
I haven't worked with this code in a while thus I don't remember what it
was.  I'll try Image and see what breaks.  Then I'll know what
functionality was missing when I used Image instead of Picture.

Right now it's academic because I still don't have the contents being sent
to the DrawingArea being displayed, regardless of how I set the cached
property.

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher




More information about the User mailing list