NO

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

Offline leandrojardim

  • Member
  • *
  • Posts: 78
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 »

Offline leandrojardim

  • Member
  • *
  • Posts: 78
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. :)