MCPcopy Create free account
hub / github.com/Profactor/cv-plot / render

Method render

CvPlot/examples/examples_core.cpp:297–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295 struct MyRect :public Drawable {
296 cv::Rect2d _rect = cv::Rect2d(3, 4, 5, 6);
297 void render(RenderTarget &renderTarget) override {
298 auto p1 = renderTarget.project({ _rect.x, _rect.y });
299 auto p2 = renderTarget.project({ _rect.x + _rect.width, _rect.y + _rect.height });
300 cv::rectangle(renderTarget.innerMat(), cv::Rect2d(p1, p2), cv::Scalar(0, 0, 255), 3);
301 }
302 bool getBoundingRect(cv::Rect2d &rect) override {
303 rect = _rect;
304 return true;

Callers 4

test_plot.cppFile · 0.45
examples_core.cppFile · 0.45
WindowMethod · 0.45
updateMethod · 0.45

Calls 1

projectMethod · 0.45

Tested by

no test coverage detected