Before modifing
after modyfing
just as we can see,i want to achieve it by code.I have searched many materials ,but they are just making a rounded rectangle by their own color,not form one picture.Any help will be very appreciated.
Before modifing
after modyfing
just as we can see,i want to achieve it by code.I have searched many materials ,but they are just making a rounded rectangle by their own color,not form one picture.Any help will be very appreciated.
I made a method for doing this which takes an original pixmap (image) and combines it with a mask to crop the original image to the shape of the mask. I posted the code in a question here:
libGDX: How can I crop Texture as a circle
In your case the mask should be a rounded rectangle. It doesn't matter what the color of the mask is as long as the alpha channel is "1". Then the result will be your original image cropped to the rounded rectangle.