android - How to draw only the sprite from an image on the canvas

Posted by user1320494 on Stack Overflow See other posts from Stack Overflow or by user1320494
Published on 2012-04-08T16:33:30Z Indexed on 2012/04/08 17:30 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

this is the first time for me here, so I hope I'm doing this right :)

My question is the following: how do I draw the sprite from an image on the canvas, so that I don't get the entire (squared) image to show, but only the parts of the image I want (= the sprite). For example, I have an image of a robot on a white background and I only want to see the robot, and not the white background.

I hope someone here can help me with this problem, because it's giving me headaches of not knowing how to do it :P

© Stack Overflow or respective owner

Related posts about java

Related posts about android