That did the trick, thanks
for those who are looking to do the same, here are the codes
Matrix matrix = canvas.getMatrix();
matrix.postRotate(180, icon.getWidth()/2, icon.getHeight()/2);
matrix.postScale(-1, 1);
matrix.postTranslate(icon.getWidth(), 0);
canvas.concat(matrix);
canvas.translate(0, -icon.getHeight());
On Jun 2, 10:38 am, Robert Green <[email protected]> wrote:
> Sorry,
>
> Try matrix.postScale(-1, 1);
>
> That'll do it.
>
> On Jun 2, 7:05 am, z <[email protected]> wrote:
>
> > Actually it didnt work, rotated but it's not flip, still need help
> > from someone who knows these stuffs
>
> > On Jun 2, 8:03 am, z <[email protected]> wrote:
>
> > > never mind i got it
>
> > > canvas.save();
>
> > > Matrix matrix = canvas.getMatrix();
> > > matrix.postRotate(180, icon.getWidth()/2, icon.getHeight()/2);
> > > canvas.concat(matrix);
>
> > > On Jun 2, 7:50 am, z <[email protected]> wrote:
>
> > > > Example codes please.
>
> > > > On Jun 2, 1:43 am, Robert Green <[email protected]> wrote:
>
> > > > > I use a matrix and postRotate.
>
> > > > > On Jun 2, 12:25 am, z <[email protected]> wrote:
>
> > > > > > For example, to create a reflection of an image like it was
> > > > > > described
> > > > > > in the following article
>
> > > > > >http://www.everydayflash.com/blog/index.php/tutorials/reflection-effect/
>
> > > > > > I had tried
>
> > > > > > Canvas canvas = new Canvas(icon2);
> > > > > > canvas.save();
>
> > > > > > canvas.rotate(180, icon.getWidth()/2, icon.getHeight()/2);
> > > > > > canvas.scale(-1, 1);
>
> > > > > > canvas.drawBitmap(icon, 0, 0, null);
> > > > > > canvas.restore();
>
> > > > > > That didnt appear to work at all, can someone know the answer help
> > > > > > me
> > > > > > out?
>
> > > > > > I had also tried using the Camera class and couldnt get that to work
> > > > > > either. There are very little documentations on this that I can
> > > > > > find.
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---