Commit 578107c3 authored by Davis King's avatar Davis King

Fixed a problem where the pixel click location reported by

image_window::get_next_double_click() was slightly off.
parent 5cc5c116
...@@ -6091,9 +6091,9 @@ namespace dlib ...@@ -6091,9 +6091,9 @@ namespace dlib
point p(x,y); point p(x,y);
p -= origin; p -= origin;
if (zoom_in_scale != 1) if (zoom_in_scale != 1)
p = p/(double)zoom_in_scale; p = p/zoom_in_scale;
else if (zoom_out_scale != 1) else if (zoom_out_scale != 1)
p = p*(double)zoom_out_scale; p = p*zoom_out_scale;
if (dlib::get_rect(img).contains(p)) if (dlib::get_rect(img).contains(p))
image_clicked_handler(p, is_double_click); image_clicked_handler(p, is_double_click);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment