Hi all.

I might be completely off-base here, but I've spent the last two days
trying to figure this out and, without success, you're my only hope.

What I'm doing is simple:

  * I have a canvas where I draw a circle with center on (10, 10),
with radius = 5;

  * Then, I obtain the canvas transformation matrix

      > Matrix m = canvas.getMatrix();

  * And then I create a new rectangle, I map it using the matrix and I
use the canvas to draw it.

      > RectF ri = new RectF(5, 5, 15, 15);
      > RectF rf = new RectF();
      >
      > m.mapRect(rf, ri);
      >
      > canvas.drawRect(rf, p);

My problem: basically, the rectangle is being drawn in a different
position along the Y-axis.

I outputed the transformation matrix and, by default, it is translated
by zero in the X-axis and by 25.0 in the Y-axis.

Please note that I made NO transformations, either translate, scale or
rotate.

I am unable to understand why this is happening and how to avoid it.

Any help will be appreciated.

Thanks.

--J

-- 
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

Reply via email to