Simplified the add_overlay() interface for image_window.

This commit is contained in:
Davis King 2012-01-21 16:42:47 -05:00
parent c509592599
commit cb578ea22f
2 changed files with 44 additions and 0 deletions

View File

@ -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
);

View File

@ -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
);