Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
595f0128
Commit
595f0128
authored
Jun 19, 2016
by
Davis King
Browse files
Made it so the image_display lets you add parts outside the object's bounding
box.
parent
dfefd981
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
dlib/gui_widgets/widgets.cpp
dlib/gui_widgets/widgets.cpp
+2
-3
No files found.
dlib/gui_widgets/widgets.cpp
View file @
595f0128
...
@@ -6038,8 +6038,7 @@ namespace dlib
...
@@ -6038,8 +6038,7 @@ namespace dlib
if
(
!
rect_is_selected
)
if
(
!
rect_is_selected
)
return
;
return
;
const
rectangle
valid_area
=
get_rect_on_screen
(
selected_rect
);
const
point
loc
=
last_right_click_pos
;
const
point
loc
=
nearest_point
(
valid_area
,
last_right_click_pos
);
// Transform loc from gui window space into the space used by the overlay
// Transform loc from gui window space into the space used by the overlay
// rectangles (i.e. relative to the raw image)
// rectangles (i.e. relative to the raw image)
...
@@ -6569,7 +6568,7 @@ namespace dlib
...
@@ -6569,7 +6568,7 @@ namespace dlib
if
(
btn
==
base_window
::
RIGHT
&&
rect_is_selected
)
if
(
btn
==
base_window
::
RIGHT
&&
rect_is_selected
)
{
{
last_right_click_pos
=
point
(
x
,
y
);
last_right_click_pos
=
point
(
x
,
y
);
parts_menu
.
set_rect
(
get_rect_on_screen
(
selected_rect
)
);
parts_menu
.
set_rect
(
rect
);
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment