Hi,

On 2/16/11 9:23 AM, eric wrote:
Philipp Lohmann a écrit : If you wanted to emulate this behavior on all platforms you could have your own control that does this using a VitualDevice to prepare its text and then only copy that to the window when the ::Paint method gets called. But that is probably a bit overblown.


After lot of tries, and some algo improvments, I fear this will be the only relible solution : flickering is always present on both Windows and Linux.

Could you please give me some tracks, or point me existing example in the code, to implement this VirtualDevice ? (of course the code will be reversed if you consider it interesting for OpenOffice.org)
You would have a VirtualDevice that spans the area where you currently have "flickering" problems. So when the need to change the contents of that area arises, you can do all painting in that backbuffer and only copy it to window when you're done.

So like this:

#include "vcl/virdev.hxx"

void UpdateAffectedArea()
{
    VirtualDevice aDev;
    aDev.SetBackground( Color( < my background color > ) );
    aDev.SetOutputSizePixel( < my size in pixel > );

    maFixedText.Draw( &aDev, <position>, <size>, <flags> );

    maWindow.DrawOutDev(
<position in window>, <my size in pixel>,
        Point( 0, 0 ), <my size in pixel>,
&aDev );

}

However there is a caveat: since you do not have a real FixedText control there anymore, accessibility will not work for this area, so no screen readers etc. Not worth dropping that for a little flicker IMHO, but possible.

Kind regards, pl

--

<http://www.oracle.com/>
Philipp Lohmann | Software engineer

OracleOpen Office Development

ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

<http://www.oracle.com/commitment>

        

Oracle is committed to developing practices and products that help protect the environment




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@gsl.openoffice.org
For additional commands, e-mail: dev-h...@gsl.openoffice.org

Reply via email to