[android-developers] Re: Mirroring a RelativeLayout
I want to flip the canvas _after_ all subviews are rendered, so that
the entire view is mirrored. That's why I put the transform after the
super. I do admit that is not based on actual knowledge how this stuff
really works. (by the way, the same function on iOS requires only a
single line of code!)
I sent you the screenshots via email... Hope that isn't violating the
group code.
On Mar 5, 3:46 am, TreKing <treking...@gmail.com> wrote:
> On Fri, Mar 4, 2011 at 3:23 PM, lbendlin <l...@bendlin.us> wrote:
> > @Override
> > protected void dispatchDraw(Canvas canvas) {
> > canvas.save(Canvas.MATRIX_SAVE_FLAG);
> > super.dispatchDraw(canvas);
> > Log.v("This",""+getWidth());
> > canvas.scale(-1f,1f, getWidth() * 0.5f, getHeight() * 0.5f);
> > canvas.restore();
> > }
>
> Shouldn't you be drawing *after* scaling the canvas? To apply the rendering
> to the transformed matrix?
>
> --------------------------------------------------------------------------- ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home