MCPcopy Create free account
hub / github.com/autowarefoundation/vision_pilot / fill_rect

Function fill_rect

VisionPilot/modules/debug/src/debug_draw.cpp:83–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83static void fill_rect(cv::Mat& img, cv::Rect r, cv::Scalar color, double alpha)
84{
85 const cv::Rect clip = r & cv::Rect(0, 0, img.cols, img.rows);
86 if (clip.width <= 0 || clip.height <= 0) return;
87 cv::Mat roi = img(clip);
88 cv::Mat block(roi.size(), roi.type(), color);
89 cv::addWeighted(block, alpha, roi, 1.0 - alpha, 0.0, roi);
90}
91
92struct OverlayLayout {
93 int hud_y = 0;

Callers 4

draw_panelFunction · 0.85
draw_tagFunction · 0.85
draw_top_barFunction · 0.85
draw_hud_panelFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected