Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: 神炫 on June 14, 2015, 08:05:45 AM

Title: ui2dsprite use packed image, it has blank border
Post by: 神炫 on June 14, 2015, 08:05:45 AM
First image is ui2dsprite,
second image is sprite editor
Title: Re: ui2dsprite use packed image, it has blank border
Post by: ArenMook on June 16, 2015, 12:38:49 PM
NGUI adds 1 pixel of spacing to a sprite if its dimensions are not even. Ie: if your image has a height of 17 pixels, NGUI will add 1 pixel of padding to make it 18, thus dividable by two. Use a non-center pivot, and you won't need the sprite's dimensions to be dividable by two.
Title: Re: ui2dsprite use packed image, it has blank border
Post by: 神炫 on June 17, 2015, 08:40:35 AM
If the image packed from ngui, it's work fine. But if the image is multiple sprite mode, it has the problem.
If the sprite height is even, sprite is out of the scope of this widget.