[TYPO3-core] RFC #15662: Bug: SpriteGeneration generates wrong output if there are several icons sizes which are same width and nearly same count

Steffen Ritter info at rs-websystems.de
Wed Sep 8 14:32:01 CEST 2010


Hey list,
This is an SVN patch request.

Type: Bug

Bugtracker references:
http://bugs.typo3.org/view.php?id=15662

Branches: trunk (SpriteGenerator only present in trunk)


Problem:
The spriteGenerator sorts icons into groups depending on their size.
It also arranges icons in the sprite from the width in the sprite 
descending.

This information is stored in an array with the "width" of the icons as key.
If there are two icon groups, which icons have the same width and same 
icon-count (in fact width * ceilg(sqrt(icon-count)) equals) they 
overwrite each other in the array, and one group is positioned at 0,0.

Solution:
If the "width" is equal for two groups, the ordering does not matter, so 
just increase the key by one until the array key is free.


regards
Steffen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 15662.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100908/138019a9/attachment.txt>


More information about the TYPO3-team-core mailing list