Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7577169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:06:58+00:00 2026-05-30T17:06:58+00:00

I am working on an application in Android, wherein I have to get android.graphics.

  • 0

I am working on an application in Android, wherein I have to get android.graphics.path values and compare them.

Consider the following images :

and

enter image description here

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.

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?

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 getMatrix for my current canvas?), so as to have the same effect for different screen sizes?

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!

Please help or guide! Thanks! 🙂

Edit:

The code that I’m using for converting my path values to String. My path values are stored in an ArrayList (called pointsToDraw ). Here’s the 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);
                        }

            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:06:59+00:00Added an answer on May 30, 2026 at 5:06 pm

    A Path object is an object that encapsulates a series of geometric paths. If you want to programmatically compare one path to another, then the place I think you have to start is to use PathMeasure on that Path object in order to pull out all of the co-ordinates. Using PathMeasure you can obtain a series of co-ordinates that the path follows, by supplying a distance argument.

    PathMeasure

    Then, in order to determine whether one given path is similar to another in terms of the size and its path along the screen, I would perhaps suggest using PathMeasure on them both and comparing the co-ordinates they produce given incremental distance arguments. Then use some comparison algorithm, which may be as simple as determining whether each set of compared co-ordinates are within a distance from each other (with relative starting co-ordinates taken into account).

    So I can’t help with the algorithm you would use, but as a starting point, I think it’s PathMeasure that you have to use in order to inspect and analyse the data within the Path to begin with. Or, you might want to render them to bitmap and use some kind of image recognition library to compare those bitmaps, perhaps?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an application for android and we since we have lots
I am working on a fairly basic screen layout for my first Android application
I have pretty much finished my first working Symbian application, but in my hastened
I'm working on an Android application where I'd like to have the largeHeap and
Hi I am working Android application development using titanium studio.I have developed small application.my
I'm working on an android application, and I have a drawable that I'm loading
I want to get fling gesture detection working in my Android application. What I
I am making an android application in which I have put 10 images and
I am working on android application in which i have play online radio streaming.
I am working in android application.I have one doubt How long it takes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.