Hello Guest

Author Topic: Masking a Sprite?  (Read 3339 times)

kashif789us

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Masking a Sprite?
« on: July 16, 2015, 08:52:49 am »
Hello guys, I am designing a ground. It contains 2 parts. tk2dSlicedSprite for the background and tk2DTiledSprite for the texture of the ground.

The background is a simple one colored image but texture has design on it and will be repeated depending upon the length of the ground.

What I want is that texture (tk2DTiledSprite) gets masked outside the bounds of the background (tk2DSlicedSprite). In short, how much I increase the size of the texture it never exceeds the bounds of background. How can I do this? Thank you

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Masking a Sprite?
« Reply #1 on: July 17, 2015, 02:55:03 am »
Look at the UI mask sample - you can use that to mask out rectangular regions.