draw rotated path at particular point
<p>I'm working on a custom view (<code>extends View</code>) and working in the <code>onDraw</code> method.</p>

<p>I have made a path of an arrow:</p>

<pre><code>    ARROW_PATH = new Path();
    ARROW_PATH.setLastPoint(20, 37);
    ARROW_PATH.lineTo(14, 25);
    ARROW_PATH.lineTo(18, 26);
    ARROW_PATH.lineTo(17, 4);
    ARROW_PATH.lineTo(23, 4);
    ARROW_PATH.lineTo(22, 26);
    ARROW_PATH.lineTo(26, 25);
    ARROW_PATH.close();
</code></pre>

<p>In different scenarios it needs to be rotated to depict a certain angle, and I need to draw it at a particular coordinate in the view. The coordinate also changes depending on the scenario.</p>

<p>I've tried playing around with <code>Canvas.rotate</code> however, it looks like the aspect of the path is skewed when the <code>px</code> and <code>py</code> values are not equal (the arrow gets narrower and taller when <code>py &gt; px</code>.</p>

<p>I have also tried <code>Canvas.rotate(angle, 0, 0);</code> and then <code>ARROW_PATH.moveTo(x, y);</code> but it looks like the coords are rotated by the arbitrary angle making it very hard to calculate the required coordinate.</p>

<p>Ideally, I'd like to rotate the path and not the canvas but I don't think this operation is supported by the API.</p>

<p>Can someone suggest a better approach to this problem?</p>

<p>thanks, p.</p>
