Understanding android.graphics.path and comparing android.graphics.path values
<p>I am working on an application in Android, wherein I have to get android.graphics.<a href="http://developer.android.com/reference/android/graphics/Path.html" rel="nofollow">path</a> values and compare them.</p>

<p>Consider the following images : </p>

<p><img src="http://i.stack.imgur.com/NXVYV.jpg" alt=""></p>

<p>and</p>

<p><img src="http://i.stack.imgur.com/KTbCm.jpg" alt="enter image description here"></p>

<p>The first image shows a straight line and the generated Path value. Similarly, the second image,also shows a similar straight line, with a different Path value.</p>

<p>I'm unable to understand the value that is generated. Can anyone explain as to what exactly the generated values mean? Can I approximately take a wild guess about a path value from the screen coordinates?</p>

<p>Also, in my application, I would like to compare path values. The lines shown in the above figure are similar. And in my application, I would like to compare them and render them as same lines. And I'm not just going to compare lines, there'll be curves and all such drawable shapes. For comparison do I first have to normalize my path values (maybe calling <a href="http://developer.android.com/reference/android/graphics/Canvas.html#getMatrix%28%29" rel="nofollow">getMatrix</a> for my current canvas?), so as to have the same effect for different screen sizes?</p>

<p>There is one other way of comparison that will be much simpler,finding centroids of the paths of figures. Obviously lines will have a centroid at a different position compared to curves,etc. But this sort of comparison won't be so accurate. I wanted to store some value and then compare the generated path value to the stored value, along with comparing the centroids, so as to have a better accuracy. But for that, I need to understand the generated path values!</p>

<p>Please help or guide! Thanks! :-)</p>

<p><strong>Edit:</strong></p>

<p>The code that I'm using for converting my path values to String. My path values are stored in an <code>ArrayList</code> (called <code>pointsToDraw</code> ). Here's the code :</p>

<pre><code>@Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                        synchronized(pointsToDraw){
                        for(Path path : pointsToDraw)
                        {
                            stringPoints.add(String.valueOf(path));
                        }
                        }
                        TextView b1Text = (TextView) findViewById(R.id.GText);
                        for(String s : stringPoints)
                        {
                            b1Text.setText(s);
                        }

            }
</code></pre>
