Author Topic: sliced sprite based on image percentage instead of pixels  (Read 1414 times)

aceteams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 3
    • View Profile
sliced sprite based on image percentage instead of pixels
« on: June 18, 2014, 08:58:56 PM »
There's something we're trying to accomplish and we think it might be time to implement some kind of special sliced sprite.

What we want is basically a sliced sprite that is "protected" from non-uniform scaling, but not uniform scaling.

This would be ideal for our art assets - they are designed to look good when uniformly scaled, but not when non-uniformly scaled. The result is that the current sliced sprite implementation makes them look strange/ugly when uniformly scaling them.

basically we want is something very similar to a sliced sprite, except that we want to define the borders of the sprite in terms of percentages rather than in terms of pixels.

What's the best way to do this? Is there something already in NGUI that we aren't finding? Or should we try to write it ourselves? If the latter, where's a good place to start?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: sliced sprite based on image percentage instead of pixels
« Reply #1 on: June 19, 2014, 06:01:19 PM »
How would you slice a sprite based on percentage values? Sliced sprite defines which part of the original sprite is the border, and keeps that at fixed width and/or height. Percentage wouldn't make sense.