[Libgdx] Draw inside a PNG

Hello everyone,

Let’s say that I have a png named “Shape” and a texture named “Tex”. Shape is the shape with a transparent background (I think it’s called an alpha channel) and Tex is a rectangular texture.

And I want to draw the texture inside the shape. Like clipping a texture in scissors stack.

How to do that ?

There is so many ways to do that.
Ways that i know is this

public void render(‘Any graphics variable that can draw’){

g.drawmethod(‘yourimage’, x, y);
g.drawmethod(‘youranotherimage’, x + 10, y + 10)

}

and if you move the x it will act like its clipped but its not.