On Tue, 29 May 2007 11:26:02 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:

> Well I've reduced the flicker a little by doing a few small things
> (mostly not reloading images unless they have changed).
> I also set the "DoubleBuffered" property of the components to true,
> though I see no effect from doing so nor do I know what effect it's
> supposed to have.
> My understanding of doublebuffering (as I learned it doing things like
> SDL) is that it means that any changes to the component/canvas is
> drawn in memory NOT on screen, and only when they are all done do you
> update the component with one single action (drawing the memory buffer
> to the screen buffer - known commonly as a 'flip') - my TDoubleBuffer
> component is based on doing exactly that.
> What it means when you set the doublebuffered property of a button to
> true I don't know - though I would love to find out.

DoubleBuffered is a hint for the interface.
The gtk2 intf always paints double buffered for each gdkwindow.
That means paint events are double buffered, other painting not. The
gtk1 intf has almost no doublebuffering. I'm not sure about
the other interfaces.

I only did a small test: The gtk intf only paints once per Invalidate
and there I see no flicker at all. That's because the bitbtn glyph
handle is a memory handle and not an image on the screen. Maybe the
win32 intf is creating a screen handle? That would explain the
flickering.


Mattias


> 
> A.J.
> 
> On 5/29/07, Dave Coventry <[EMAIL PROTECTED]> wrote:
> > AJ,
> >
> > In my case, when the image is redrawn, the TImage was cleared which
> > showed the underlying colour (clBtnFace), which caused the flicker
> > when the black background was painted in.
> >
> > I'm not sure of how relevant it would be in your case, but I
> > changed the colour of the underlying panel to black, which
> > eliminated the flicker.
> >
> > It would depend, I guess, on the colour of your graphic and the
> > colour of the background displayed when it clears. (I'm not really
> > auf fe with the TBitBtn components, having never used them).
> >
> > A.J. Venter wrote:
> > > On 5/29/07, Felipe Monteiro de Carvalho
> > > <[EMAIL PROTECTED]> wrote:
> > >> On 5/29/07, A.J. Venter <[EMAIL PROTECTED]> wrote:
> > >> > I have a couple of TBitBtn components. Appart from their
> > >> > captions and glyphs, I actually write some information to the
> > >> > canvasses which are meant to show up ON TOP of each glyph.
> > >>
> > >> I would write my own fully custom-drawn button to do this.
> > > I was afraid you'd say that :)
> > > Now imagine my deadline is a few hours only and I have other
> > > outstanding functionality to code...
> > >
> > > A.J.
> > >
> > > _________________________________________________________________
> > >     To unsubscribe: mail [EMAIL PROTECTED] with
> > >                "unsubscribe" as the Subject
> > >   archives at http://www.lazarus.freepascal.org/mailarchives
> > >
> > >
> >
> >
> > --
> > Dave Coventry
> > Tel   (home):  +27(0)31 3092301
> > Tel (office):  +27(0)31 2058448
> >
> > Cell: +27(0)82 9000179
> >
> > _________________________________________________________________
> >      To unsubscribe: mail [EMAIL PROTECTED] with
> >                 "unsubscribe" as the Subject
> >    archives at http://www.lazarus.freepascal.org/mailarchives
> >
> 
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to