Jump to content

Stretch the center of a sprite


threeninenineone
 Share

Recommended Posts

Hi guys I am creating interface elements using sprite images. Not sure if this is best practice, open to suggestion.
For example; at the moment a have large image for an input field which is fine and it works.

image.png.5c7875eaf3e354228376bf094c3238f6.png

------------------------------------
|                                  |
------------------------------------

However now i need nearly the exact same sprite just half the width for a small input field.

--------------------
|                  |
--------------------

So the middle of the sprite is actually the same but the corners can't be stretched as I would like to maintain the same corner radius
I don't really want to create a seperate sprite for each of the corners unless you think that is best.
So what I really want is to be able to create a very small sprite.

---
| |
---

And stretch the center pixel horizontally.

However as I have said this may be far away from what is the best way to achieve this, so let me know!

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...