[Kde-games-devel] SVG and MainWindow resize handling
Burkhard Lehner
burkhard.lehner at googlemail.com
Sat Jan 19 17:40:12 CET 2008
Hi,
Sorry to maybe ask a stupid question:
If it is not reliable to react on resize events to render the SVG graphics
in a different size, why isn't the paint event used?
You could check for every paint event if the window size has changed until
the last paint event, and render the SVG graphics only if needed.
The only drawback I could see is the case when the user permanently changes
the size (by dragging the corner of the window back and force). This for
sure produces lots of resize events, but I'm not sure if it also produces a
paint event for every resize event. I'm not sure how it works, but it seems
to happen that earlier paint events are dropped if the next resize event
already arrives before the paint event has been executed. If that is not
done automatically, it should be easy to do this on your own: Ignore a paint
event, if there is already a resize event in the event queue.
And just to compare it to Microsoft Windows' behaviour: In Freecell, when
changing the window size, first the rescaled pixmap versions of the cards
are used, until the rendered vector versions are computed. I don't know if
this is already done in kgames, but I think it could easily be implemented.
Burkhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20080119/30bc885b/attachment.html
More information about the kde-games-devel
mailing list