Le 17 févr. 11 à 13:01, Philipp Lohmann a écrit :

Hi,



Hi Philipp,


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.


If this can help, most of the flicker occurs whith Hide() method. Don't ask me why :)


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 );

}



Thank you very much for this explanation, I'll start today with that, and I hope I'll make progress in the coming week.



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.



I'm not sure to understand : when the mouse cursor rolls over one button, it it not over the text area, but on the button area, no ? So maybe accessibility will continue to work ? (but maybe I missed something).

Anyway, I consider the flicker as a blocker (avoiding us to release 1.2) and I'd like to see how things work once fixed.


Thanks again for your golden advices :)

Eric

--
qɔᴉɹə
Education Project:
http://wiki.services.openoffice.org/wiki/Education_Project
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news





Reply via email to