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

Method getRect

CvPlot/examples/examples_gui.cpp:179–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177 cv::Vec2d _dragOffset;
178 const double _size = 30;
179 cv::Rect2d getRect(const Projection &projection) {
180 auto p = projection.project(_point);
181 cv::Point2d diag2(_size / 2, _size / 2);
182 return cv::Rect2d(p - diag2, p + diag2);
183 }
184 void render(RenderTarget &renderTarget) override {
185 cv::rectangle(renderTarget.innerMat(), getRect(renderTarget), cv::Scalar::all(0), cv::FILLED);
186 }

Callers

nothing calls this directly

Calls 1

projectMethod · 0.45

Tested by

no test coverage detected