24#include <fvfilters/roidraw.h>
25#include <fvutils/color/color_object_map.h>
26#include <fvutils/draw/drawer.h>
43:
Filter(
"FilterROIDraw"), rois_(rois), border_style_(style)
55FilterROIDraw::draw_roi(
const ROI *roi)
60 bool draw_black =
false;
66 for (
unsigned int x = roi->
start.
x; x <= end.
x; ++x) {
69 draw_black = !draw_black;
77 for (
unsigned int y = roi->
start.
y; y <= end.
y; ++y) {
80 draw_black = !draw_black;
91 unsigned char *ldyp = dyp;
125 for (std::list<ROI>::const_iterator r = rois_->begin(); r != rois_->end(); ++r) {
148 border_style_ = style;
static YUV_t get_color(color_t color)
YUV_t getter.
void color_point(unsigned int x, unsigned int y)
Color the given point.
void set_color(unsigned char y, unsigned char u, unsigned char v)
Set drawing color.
void set_buffer(unsigned char *buffer, unsigned int width, unsigned int height)
Set the buffer to draw to.
void set_rois(const std::list< ROI > *rois)
Set ROIs.
virtual void apply()
Apply the filter.
virtual ~FilterROIDraw()
Destructor.
void set_style(border_style_t style)
Sets the preferred style.
FilterROIDraw(const std::list< ROI > *rois=0, border_style_t style=INVERTED)
Constructor.
border_style_t
Defines the possible border styles to display a ROI.
@ DASHED_HINT
Displays border dashed black and color of hint.
unsigned char * dst
Destination buffer.
ROI * dst_roi
Destination ROI.
unsigned int height
ROI height.
fawkes::upoint_t start
ROI start.
unsigned int line_step
line step
unsigned int width
ROI width.
unsigned int image_width
width of image that contains this ROI
color_t color
ROI primary color.
unsigned int pixel_step
pixel step
unsigned int image_height
height of image that contains this ROI
Point with cartesian coordinates as unsigned integers.
unsigned int x
x coordinate
unsigned int y
y coordinate
static YUV_t_struct black()