Added another add_overlay() overload.

This commit is contained in:
Davis King 2012-01-21 16:52:41 -05:00
parent 55c1d6cdef
commit 7b5cedcd7b
2 changed files with 22 additions and 0 deletions

View File

@ -3487,6 +3487,17 @@ namespace dlib
void add_overlay(const rectangle& r, pixel_type p, const std::string& l)
{ add_overlay(image_display::overlay_rect(r,p,l)); }
template <typename pixel_type>
void add_overlay(const std::vector<rectangle>& r, pixel_type p)
{
std::vector<overlay_rect> temp;
temp.resize(r.size());
for (unsigned long i = 0; i < temp.size(); ++i)
temp[i] = overlay_rect(r[i], p);
add_overlay(temp);
}
void add_overlay (
const overlay_line& overlay
);

View File

@ -2722,6 +2722,17 @@ namespace dlib
- performs: add_overlay(overlay_rect(r,p,l));
!*/
template <typename pixel_type>
void add_overlay(
const std::vector<rectangle>& r,
pixel_type p
);
/*!
ensures
- adds the given set of rectangles into this object such
that they will be displayed with the color specific by p.
!*/
void add_overlay (
const overlay_line& overlay
);