Hi,
I just wanna know what's the best method to only copy a region of an image. (without using copyRegion that is MIDP 2).
Thanks
Hi,
I just wanna know what's the best method to only copy a region of an image. (without using copyRegion that is MIDP 2).
Thanks
You mean copy it to another image ? Can't you just get the 'graphics' of where you want to copy it to and turn the clipping on, before drawing it into the new image ? eg.
Image source; // the image to be copied
Image copy = Image.createImage(source.getWidth(), source.getHeight());
Graphics g = copy.getGraphics();
g.setClip( 8, 8, 8, 8 );
g.drawImage(source, 0, 0, TOP|LEFT );
Which should copy an 8by8 chunk of the first image.
btw It's a bit quiet in here init ?