Nick, Did you figure this one out? I want to do the same.

On Mar 9, 12:50 pm, Nick <[email protected]> wrote:
> Hello!
> I'm creating a simple game for Android and faced with a problem: Idea
> is to have a huge "map" image file and re-drawonly small part of it
> (320*480) depending on user actions.
>
> I didn't find a better solution than using "public staticBitmap
> createBitmap (Bitmapsource, int x, int y, int width, int height)"
> method and decided to try it (expected huge performance degradation),
> but actually it's appeared that this method changes sourcebitmapand
> when i call it second time source size is significantly reduced. For
> instance this code:
>
> int bitHeight = mBackgroundImage.getHeight();
> int bitWidth = mBackgroundImage.getWidth();BitmapcurMap 
> =Bitmap.createBitmap(mBackgroundImage,
>                 0, mY, 320, 480);
> canvas.drawBitmap(curMap, 0, 0, null);
>
> gives 320*960 (initial source image size) size for the first time and
> 320*455 for the second call
>
> I hope this is not a best solution and look forward to hearing a new
> direction or at least clarification on createBitmap method.
>
> p.s i'm not a native english speaker and i apologise for possible
> mistakes.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to