Original Bitmap resize problem

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Original Bitmap resize problem

Postby knu » Tue Mar 10, 2009 11:00 pm

Hi folks!

Can somebody explain me how canvas.drawBitmap method works. Here is my sample code:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. Rect rect = new Rect(0, mY, 320, mY + 480);
  3.  
  4. Rect rect2 = new Rect(0, 0, 320, 480);
  5.  
  6. canvas.drawBitmap(mBackgroundImage, rect, rect2, null);
  7.  
  8. canvas.save();
  9.  
  10. mY++;
  11.  
  12.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


mBackgorundImage is originally 320*960 pixels png but when i call this code second time it becomes 320*455 - WHY this resize happens?!

What i actually wanna do is to draw only small part of the whole map depending on user actions.
knu
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Mar 10, 2009 10:43 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 5 guests