sorry the code should be

Matrix matrix = new Matrix();
 matrix.postRotate(90);

Canvas g = new Canvas(image2);

g.drawBitmap(
                                Bitmap.createBitmap(image, 0, 0,
image.getWidth
(), image.getHeight(), matrix, true)
                                , 0, 0, null);

On Mar 22, 5:18 pm, William <[email protected]> wrote:
> My goal is the draw a bitmap onto another bitmap butrotated90
> degress.  whats the most efficient way to do that.  My current method
> is as follows which is horribly bad because it creates a new bitmap
> every time.
>
> //i am taking image and drawing itrotatedonto image2
>
> Matrix matrix = og.getMatrix();
>  matrix.postRotate(90);
>
> Canvas g = new Canvas(image2);
>
> g.drawBitmap(
>                                 Bitmap.createBitmap(image, 0, 0, 
> image.getWidth
> (), image.getHeight(), matrix, true)
>                                 , 0, 0, null);
--~--~---------~--~----~------------~-------~--~----~
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