NO

Author Topic: How to map a point to a "stretched" bitmap  (Read 6454 times)

leandrojardim

  • Guest
How to map a point to a "stretched" bitmap
« on: June 14, 2016, 01:47:31 AM »
I am blitting an offscreen bitmap to a overlapped window where I draw bitmap "objects" and my program allows the user to select and move the objects around the screen with the mouse. The problem is that I want to allow the user to resize the window and the offscreen bitmap together with it. When I resize the window and I click an object with the mouse the mouse cursor coordinates points to the object on the non-scaled bitmap, but I need to find the object on the scaled bitmap. How can I fix this, please? This is for a personal project.
« Last Edit: June 14, 2016, 02:17:55 AM by leandrojardim »

leandrojardim

  • Guest
Re: How to map a point to a "stretched" bitmap
« Reply #1 on: June 14, 2016, 06:03:33 AM »
I found that I need to scale the coordinates. Finally it's working. :)