Texture2D: Clip / Trim / Crop

Texture2D: Clip / Trim / Crop
0
#1

Is there a fine way to do this programatically?
Can someone help and point me to the right doc / direction?

#2

Hi ! You can use ClippingNode !

#3

There is no such thing.
I am using Cocos Creator 2.0.9 and 2.1.1. I really need to cut down images…

#4

Why not use a Mask?

#6

Because I need to cut texture dynamically in multiple places and cut it into multiple sprite frames. The mask cannot do that

#7

RenderTexture can be used in many ways to achieve this concept

Create object with size you want, render whatever you want inside the object, use the getSprite method.

#8

Thank you. I will try. Is it available on 2.0.9 and 2.1.1?

#9

I dont have a getSprite method inside the RenderTexture…