[Kde-games-devel] Review Request: Port KBlocks to KGameRenderer
Stefan Majewsky
majewsky at gmx.net
Sun Sep 5 21:38:41 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5081/#review7414
-----------------------------------------------------------
I finally test-compiled. Everything looks fine, except for a major problem which hinders me from committing the patch:
/trunk/KDE/kdegames/kblocks/KBlocksSvgItem.cpp
<http://svn.reviewboard.kde.org/r/5081/#comment7615>
This is not correct. You're setting the render size in SVG coordinates, not in view coordinates. You'll need to adjust the render sizes to the sizes in view coordinates in resize events.
Alternatively, you can use the primaryView function in KGameRenderedObjectItem (KGameRenderer::setDefaultPrimaryView would be your friend then, but this works only if you instantiate the view before any items).
It's admittedly not easy to choose between these possibilities (number one involves writing a ton of boring boilerplate, while number two is deprecated because of its potentially bad performance and its surely bad API design). The real solution would be to use Tagaro::Board, which is designed for exactly this usecase, but Tagaro is far away from being ready for primetime.
- Stefan
On 2010-08-25 15:42:18, Brian Croom wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5081/
> -----------------------------------------------------------
>
> (Updated 2010-08-25 15:42:18)
>
>
> Review request for KDE Games, Mauricio Piacentini and Stefan Majewsky.
>
>
> Summary
> -------
>
> This straightforward patch makes the KBlocks rendering code use KGameRenderer instead of making its own KGameTheme and QSvgRenderer instances
>
>
> Diffs
> -----
>
> /trunk/KDE/kdegames/kblocks/KBlocksGraphics.h 1167058
> /trunk/KDE/kdegames/kblocks/KBlocksGraphics.cpp 1167058
> /trunk/KDE/kdegames/kblocks/KBlocksItemGroup.cpp 1167058
> /trunk/KDE/kdegames/kblocks/KBlocksScene.cpp 1167058
> /trunk/KDE/kdegames/kblocks/KBlocksSvgItem.h 1167058
> /trunk/KDE/kdegames/kblocks/KBlocksSvgItem.cpp 1167058
> /trunk/KDE/kdegames/kblocks/main.cpp 1167058
>
> Diff: http://svn.reviewboard.kde.org/r/5081/diff
>
>
> Testing
> -------
>
> I have tested playing games and switching themes, and encountered no problems.
>
>
> Thanks,
>
> Brian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100905/b71c92dd/attachment.htm
More information about the kde-games-devel
mailing list