Reputation: 27629
So this is what I want to do:
I have an image from which I want to take just a part of it. Let's say the image is 50px by 50px, I want to take the top left corner only 10px by 10px. so x=0, y=0, w=10, h=10
Then I want to paint this top corner, but in size 100px by 100px.
Does anyone know if this is possible? If so how would I go about it?
Thanks.
Upvotes: 1
Views: 466
Reputation: 10363
First take a look at getClip. This will allow you to draw a part of your image. Regarding scaling - you will have to write / find a procedure that does that as I know J2ME MIDP doesn't have any methods that offer this. Google search finds this (untested by me) http://willperone.net/Code/codescaling.php
Upvotes: 1