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
cb578ea2
Commit
cb578ea2
authored
Jan 21, 2012
by
Davis King
Browse files
Simplified the add_overlay() interface for image_window.
parent
c5095925
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
dlib/gui_widgets/widgets.h
dlib/gui_widgets/widgets.h
+12
-0
dlib/gui_widgets/widgets_abstract.h
dlib/gui_widgets/widgets_abstract.h
+32
-0
No files found.
dlib/gui_widgets/widgets.h
View file @
cb578ea2
...
...
@@ -3479,10 +3479,22 @@ namespace dlib
const
overlay_rect
&
overlay
);
template
<
typename
pixel_type
>
void
add_overlay
(
const
rectangle
&
r
,
pixel_type
p
)
{
add_overlay
(
image_display
::
overlay_rect
(
r
,
p
));
}
template
<
typename
pixel_type
>
void
add_overlay
(
const
rectangle
&
r
,
pixel_type
p
,
const
std
::
string
&
l
)
{
add_overlay
(
image_display
::
overlay_rect
(
r
,
p
,
l
));
}
void
add_overlay
(
const
overlay_line
&
overlay
);
template
<
typename
pixel_type
>
void
add_overlay
(
const
point
&
p1
,
const
point
&
p2
,
pixel_type
p
)
{
add_overlay
(
image_display
::
overlay_line
(
p1
,
p2
,
p
));
}
void
add_overlay
(
const
std
::
vector
<
overlay_rect
>&
overlay
);
...
...
dlib/gui_widgets/widgets_abstract.h
View file @
cb578ea2
...
...
@@ -2701,6 +2701,27 @@ namespace dlib
that it will be displayed.
!*/
template
<
typename
pixel_type
>
void
add_overlay
(
const
rectangle
&
r
,
pixel_type
p
);
/*!
ensures
- performs: add_overlay(overlay_rect(r,p));
!*/
template
<
typename
pixel_type
>
void
add_overlay
(
const
rectangle
&
r
,
pixel_type
p
,
const
std
::
string
&
l
);
/*!
ensures
- performs: add_overlay(overlay_rect(r,p,l));
!*/
void
add_overlay
(
const
overlay_line
&
overlay
);
...
...
@@ -2710,6 +2731,17 @@ namespace dlib
that it will be displayed.
!*/
template
<
typename
pixel_type
>
void
add_overlay
(
const
point
&
p1
,
const
point
&
p2
,
pixel_type
p
);
/*!
ensures
- performs: add_overlay(overlay_line(p1,p2,p));
!*/
void
add_overlay
(
const
std
::
vector
<
overlay_rect
>&
overlay
);
...
...
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