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 7554427
In Process

The Archive Base Latest Questions

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

I have an image, I’m using it as an image map. If the image

  • 0

I have an image, I’m using it as an image map. If the image was fixed then there would be no problem but I need to zoom and drag this image and get and use the coordinates of where the image clicked.

Do I need to keep track of exactly how much this image has moved and has been resized or can I get the 0x0 point of my image(the top left corner of my image).

Is there another way to do it

I should add I’ve based my image manipulation on this excellent tutorial http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2/1747?tag=rbxccnbzd1

  • 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-30T11:20:08+00:00Added an answer on May 30, 2026 at 11:20 am

    You can get the point using the same transformation matrix that is being applied to the image. You want to transform the point between the screen’s coordinate system to the image’s coordinate system, reversing the effect of the original matrix.

    Specifically, you want to transform the x,y coordinates where the user clicked on the screen to the corresponding point in the original image, using the inverse of the matrix that was used to transform the image onto the screen.

    A bit of pseudocode assuming matrix contains the transformation that was applied to the image:

    // pretend user clicked the screen at {20.0, 15.0}
    float x = 20.0;
    float y = 15.0;
    
    float[] pts[2];
    
    pts[0] = x;
    pts[1] = y;
    
    // get the inverse of the transformation matrix
    // (a matrix that transforms back from destination to source)
    Matrix inverse = new Matrix();
    if(matrix.invert(inverse)) {
    
        // apply the inverse transformation to the points
        inverse.mapPoints(pts);
    
        // now pts[0] is x relative to image left
        //     pts[1] is y relative to image top
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have image map like this <map name=imgmap> <area shape=poly coords=63,10,64,38,89,37,91,10 href=# id=x1></map> and
I have image (500x500) but I need to resize it to 200x200 and paint
Is there any way to delete file using SQL command ? I have image
Is there any javascript, css, ajax product gallery (even paid) that would have image
I have image map where i am trying to open another page by using
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I have a problem... In my view i have Image.If i click on image
I have an image and on it are logos (it's a map), I want
I have an image of a basic game map. Think of it as just

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.