Wednesday 15 August 2012

Android 4.2.2 Region.getBoundaryPath() drawing -


I wrote a code and tested it on Android 4.0.3; Everything worked fine. Now I have tested it on Android 4.2.2 and the method of filling is not working. I have simplified this problem and here is a dummy code that shows the real problem:

  paint testpaint = new paint (); Testpaint.setColor (Color.BLACK); Testpaint.setAlpha (255); Testpaint.setStyle (Paint.Style.FILL); Path p = new path (); P.moveTo (10, 10); P.lineTo (200, 10); P.lineTo (200, 250); P.lineTo (10, 200); P.lineTo (10,10); P.close (); Ritfact Rectifier = new Rectif (); Area RR = New Area (); P.computeBounds (rectF, incorrect); Rr.setPath (p, new area (rectf.left, (rectf.left), (int) rectf.top, (int) rectF.right, (int) rectf.bottom); // works Regional Generator RI = New Area Iterator (RR); Rect rect = new rect (); Int count = 0; While (ri.next (rect)) {canvas.drawRect (rect, testpaint); Count ++; } // works Canvas Navigation (P, Testpaint); // canvasdroppath (RRgate boundary path (testpint) does not work; // Work Path Outline = rr.getBoundaryPath (); Path newpath = new path (); Matrix matrix = new matrix (); Matrix.Setskale (1, 1, 0, 0); Outline.transform (matrix, newpath); Canvas pole (Newpath, Testpaint);   

The first and second draw works but the third does not do it if I do zero rotation, it also works. Why does anyone have an idea (I need getBoundaryPath version), and why does it work at 4.0.3?

getBoundaryPath () return bool as far as I know maybe try the rr.boundaryPath , whose path should be returned.

No comments:

Post a Comment