I have my code as below : 

canvas.drawBitmap(bitmap, src, dest,p); (p is null. using default paint, 
src is null aswell)

src and dest are Rect

I am trying to flip the bitmap horizontally by using canvas.scale as below 

            canvas.save();
            canvas.scale(-1.0f, 1.0f);
            canvas.drawBitmap(bitmap, src, dest, p);

The image just diappeared. 

I am trying to use matrices. But I feel there should be some easier way 
around. 

I want to flip the image and draw in the rect dest(positon and scaling)


Code I am trying now 

    Matrix flipmatrix = new Matrix();
            flipmatrix .setScale(-1, 1);
            flipmatrix .postScale(calcScaleX, calcScaleY);
            flipmatrix .postTranslate(calcPosX,calcPosY);
            c.drawBitmap(bitmap, flipmatrix , null);



Can anyone help me with this. I am not good with matrices. I think there is 
a easier way out










-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to