PNG image + transparent background


I draw a PNG image with transparent background and it works.

The problem is that when I move this image it appears a picture frame.

Why? What’s the problem?

How can I solve this?


You need to make sure that your positions are aligned to pixel boundaries. Try to either floor or ceil your x/y coords, and that should help.

What does it mean?

it means that if you say for example:

img.draw(0.1, 0.1);  

you will have the issues you are talking about.

however if you:

img.draw(floor(0.1), floor(0.1));  

you should be fine.

Thnaks jonbro :slight_smile: