HaxeFlixel/flixel-addons

How should FlxSliceSprite handle scale?

6J7KZg2f opened this issue · 1 comments

Currently FlxSliceSprite is not affected by the state of its 'scale' property.

In my own build, I have its scale setting propagating to its internal renderSprite's scale variable, meaning that it stretches the final sprite, borders and all.

Should this be the correct implementation, or should it instead be taken into account when calculating width and height prior to regenerating its graphics, leaving the borders unstretched?

The way I see it, width etc should cause the slicing to regenerate, while scale should stretch it, but I won't PR that unless that's the desired use case.

Hmm that's interesting. Theoretically, you wouldn't need the scale variable at all, but "scaling" does imply taking the existing and making it bigger. I would say that it shouldn't regen the 9 slice and should just scale up the final sprite. Otherwise, scaling is completely redundant.