[android-developers] Re: rotating a bitmap

2011-03-18 Thread Sourav Howlader
In Paint class there are three methods: setAntiAlias(); // For enabling anti alias effect. setFilterBitmap(); // When you create a bitmap, filter will be used to make the images fine. setDither(); // will handle the gradient of your image set these values as true. I think this will help you. --

Re: [android-developers] Re: rotating a bitmap

2011-03-16 Thread Marcin Orlowski
Hi, I don't think that will work for him, since he's trying to keep the > precision of the number (i.e. he needs whatever fractional part of the > division). > Correct. I just dropped my $0.02. In time of "Visual Programming", oldskool asm tricks are dimming skill :) Regards, Marcin Orlowski Tr

[android-developers] Re: rotating a bitmap

2011-03-16 Thread authorwjf
Thanks for the suggestions Nicholas & Marcin. I hope to get a chance to give them both a try tomorrow night. I especially like not having the overhead of creating the second bitmap. I didn't realize that was an option. I should have explored the canvas object more closely. -- You received thi

Re: [android-developers] Re: rotating a bitmap

2011-03-16 Thread Nicholas Johnson
Marcin, I don't think that will work for him, since he's trying to keep the precision of the number (i.e. he needs whatever fractional part of the division). Nick -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, se

Re: [android-developers] Re: rotating a bitmap

2011-03-16 Thread Marcin Orlowski
On 16 March 2011 12:52, lbendlin wrote: > don't divide by two, multiply by .5 . multiplication is much faster > than division. > If you want to divide by 2 just shift the value one bit to the right. Won't work for floats though, so you have to cast the result. Regards, Marcin Orlowski Tray Ag

[android-developers] Re: rotating a bitmap

2011-03-16 Thread lbendlin
don't divide by two, multiply by .5 . multiplication is much faster than division. On Mar 15, 5:38 pm, Nicholas Johnson wrote: > A couple things: > > This might help your pivot point that you have: instead of converting to > float after the division, try doing it before the division. Like this:

[android-developers] Re: rotating a bitmap

2011-03-15 Thread Nicholas Johnson
A couple things: This might help your pivot point that you have: instead of converting to float after the division, try doing it before the division. Like this: ((float)mBitmap.getHeight())/2f -- I believe you are losing some accuracy by doing it the other way around. As in (float)(7/2) would