title: Not rendering a transformed path
body: <p>I'm not sure I have found a bug in Android or if there is a bug in my code.  I thought it might be another (or new) manifestation of the hardware <a href="https://stackoverflow.com/questions/9837892/path-object-transformation-bug-on-android-4">acceleration bug</a> I've read about.  I am running on android 4.2, but setting <code>android:hardwareAccelerated="true"</code> in the manifest file doesn't fix things.</p>
  
  <p>The problem exists in a custom view.  It has a complex display so rather than specify all the <code>Path</code> fields separately I parse an SVG file and build the paths up from the data specification of <code>&lt;path&gt;</code> elements.  The SGV parser also extracts the SVG drawing area's width and height so that the matrix to transform between SVG space and <code>View</code> space can be generated:</p>
  
  <pre><code>Matrix t = new Matrix();
  
  float scale = Math.min(viewWidth / svgWidth, viewHeight / svgHeight);
  t.setScale(scale, scale);
  </code></pre>
  
  <p>This transform is applied to the canvas in the <code>onDraw(Canvas)</code> method.  The issue is that some of the paths render okay and some do not. It is also true of text rendered along a path.</p>
  
  <p>I think I have found the differentiator between being rendered and not rendered: straight lines.  The text that was being rendered was on a diagonal line, the text that was not was on a perfectly horizontal one.  Moving the text path off horizontal resulted in the text being rendered.  So too does changing the horizontal line to a cubic curve with the control points on the line itself - so it renders like a straight line; what I will call a straight curve from now on.</p>
  
  <p>Is it a bug in the Android acceleration code that filters out paths if the bounding box (pre- or post- translation) have zero volume (<code>boundingBox.left - boundingBox.right == 0</code> or <code>boundingBox.top - boundingBox.bottom == 0</code>)?  Maybe!  But I have other cases of paths that do not render:  paths make up of just straight lines.  Even when the bounding box of these paths has volume they don't render.  Change one of the path elements from a straight line to a straight curve and the whole path renders just fine.</p>
  
  <p>Of course, from a performance view I don't want to have to render some of my lines as straight curves, I assume that the line drawing code is quicker than the cubic curve one.  So I post this to ask if anyone else has encountered this issues and if there is a fix for it.</p>
  
  <p>Many thanks as always.</p>