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

  • Home
  • SEARCH
  • 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 7787247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:36:11+00:00 2026-06-01T20:36:11+00:00

I am working on a project in developing an android app. I need to

  • 0

I am working on a project in developing an android app. I need to let the user draw on a predefined dashed-line image and show the percentage of the resulted drawing compare with the dashed-line image.
For example, a dashed-line “A”, user fully draw overlay on the dashed-line “A”, a completion of 100% will be shown.

  • 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-06-01T20:36:12+00:00Added an answer on June 1, 2026 at 8:36 pm

    You can use alpha masking. I will use your example and explain further.

    The general idea is to insert a hidden mask which is basically an image with a predefined area that counts as a correct trace. You define that area using a color, for example the color red.

    So now you have an image with a red A. You overlay that image on your dashed line and you make it transparent (alpha channels). When the user draws, all you have to do is check whether touch events are coming in the same position as red pixels of the hidden layer. If they are, that means that the user is tracing the line.

    If you do not want to mess around with alpha channels you could be creative and do it in a different way. If I was in your place I would just create a normal image (no alpha channels needed) it could even be in grayscale (which would even be more memory efficient) and draw the different masks on it.

    e.g.
    I want the user to trace over 2 letters: an A and a B. I open up any basic image editing software. Create a grayscale image that has the exact same size as the area in which touchevents should be detected. Draw a letter A with color value 100 (gray) and then draw a letter B with color value 50 (darker gray). Save the image.

    In the application you just load up that image and keep it in memory as a 2d Array. Then you can use the onTouchevent() callback to get the touchevent positions. So, for example if the user touches the screen at postion (120,240) all you have to do is check the value at the image array you loaded earlier on at position [120][240]. If the value at that position is 100 that means the user is tracing over the letter A, if the value is 50 then the user is tracing over the letter B. Other values mean that the user is not tracing correctly.

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

Sidebar

Related Questions

I'm working on a project that requires developing an android application for a galaxy
I have a working Android tuner project app that I want to use as
i am working on a project, which i am developing with Python and PyQT4.
I'm developing an AppEngine project in Java. I'm working on a MacBook and on
I've just started working on an existing CakePHP project. I will be developing a
when working with Qt Creator and developing my project, I've added to a resource
I'm working on a project which requires us developing our own intermediate SMTP relay
I have an android app and I want to show japanese kanji on it,
I have a potential project where I would be working on developing the Data
For this project I'm working on, I'm developing live on the server (not my

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.