[Kde-games-devel] Kapman sprite system (also, connecting-tiles systems)

Mauricio Piacentini piacentini at kde.org
Wed Dec 10 18:57:51 CET 2008


Matthew Woehlke wrote:

Well, Matthew, it is difficult to argue with you. You asked for 
feedback, we gave it. But it seems like you already have a plan laid 
out, so maybe it is better to execute it, and if games pick it up then 
we can start embracing the shared classes, no problem! I am against 
restricting what people want to code by any sort of "group policy".

But in order to implement your goals, I think the Kapman maintainers 
have to agree with it. If they do, no problem! For the games I am 
maintaining I prefer to keep the ID system for now, as it seems better 
to render individual tiles, and I do not want to make existing themes 
obsolete right now.

There is just one point I mentioned that I want to clarify further:

>> All of these are not earth shattering features, but one is important 
>> imo: the ability of QSvgRenderer to render an element separately if you 
>> identify it by the ID.
> 
> Rendering a specific portion of an svg is not rocket science either, 
> therefore I fail to see that this is as advantageous as you claim.
> 
>> This alone is a huge benefit code wise: I am not sure how you are
>> going to reproduce this in your whole SVG theme, but I think it will
>> require rendering of the whole SVG and slicing the pixmaps 
>> afterwards.
> 
> Nope, not needed. You can render parts of an svg.

I do not think QSvgRenderer (or KSvgRenderer) allows this directly, does 
it? The API allows to map the whole SVG to a Rect on the Painter, but I 
think it does not allow choosing a rect in the SVG to render. By 
contrast, I was talking about the render method that takes an ID as a 
parameter, and allows optimized rendering of just this bit (as the SVG 
is already parsed and kept in the renderer object.)

Regards,
Mauricio Piacentini


More information about the kde-games-devel mailing list