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

Susanne Moog info at susannemoog.de
Thu Oct 7 20:54:44 CEST 2010


On 08.09.2010 14:33, Steffen Ritter wrote:
> Am 08.09.2010 14:32, schrieb Steffen Ritter:
>> 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.

+1 by reading. Do you have a test scenario to test this?

Best regards,

Susanne


More information about the TYPO3-team-core mailing list