Welcome,
Guest
. Please
login
or
register
.
April 27, 2026, 03:00:18 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Trimming alpha
« previous
next »
Print
Pages: [
1
]
Author
Topic: Trimming alpha (Read 5554 times)
Alessaint
Jr. Member
Thank You
-Given: 0
-Receive: 0
Posts: 67
Trimming alpha
«
on:
July 18, 2014, 01:36:53 AM »
I'm a bit lost as to how resizing of images stored with trimmed alpha should be handled. I have some 128x128 images with trimmed alpha. When I set their size to native 128x128 ("snap" button), they look fine. If I set size to 64x64 they are distorted - no longer 1:1 aspect even though size reads 64x64. This happens only when the images have trimmed alpha. Am I missing something or is it a bug?
Thanks
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Trimming alpha
«
Reply #1 on:
July 18, 2014, 06:47:24 AM »
Seems to work fine here. I just gave it a try -- added a sprite, gave it some padding (which is what trimmed alpha turns into), scaled it, and it works as expected. Make sure you're using a normal sprite, not a sliced sprite.
Logged
Alessaint
Jr. Member
Thank You
-Given: 0
-Receive: 0
Posts: 67
Re: Trimming alpha
«
Reply #2 on:
July 18, 2014, 08:20:41 AM »
Hm, you were right - I did indeed overlook the sprite being set to Sliced - I'm sorry. I was wondering though that maybe you could display a warning at UISprite component when it is set to Sliced and the sprite has a zero Border rectangle (meaning it's not intended to be used this way)?
A.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Trimming alpha
«
Reply #3 on:
July 19, 2014, 10:43:34 AM »
When the sprite has no border information, it's always drawn as a regular sprite, even if you set it to Sliced type.
Logged
Alessaint
Jr. Member
Thank You
-Given: 0
-Receive: 0
Posts: 67
Re: Trimming alpha
«
Reply #4 on:
July 20, 2014, 12:57:06 AM »
Well, that's actually my point
- Sliced sprite with no border information is drawn as regular sprite _but_ there are obviously some features where it doesn't act like one (obviously the sizing issue) - which can be a bit misleading. I'm certainly not going to make the same mistake again (or at least I hope so
but for the sake of other users I believe it should either behave like regular sprite at all aspects or there should be a warning. Just my two cents, though..
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Trimming alpha