MCPcopy Create free account
hub / github.com/creatale/node-dv / circle

Function circle

deps/opencv/modules/core/src/drawing.cpp:1777–1801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775
1776
1777void circle( Mat& img, Point center, int radius,
1778 const Scalar& color, int thickness, int line_type, int shift )
1779{
1780 if( line_type == CV_AA && img.depth() != CV_8U )
1781 line_type = 8;
1782
1783 CV_Assert( radius >= 0 && thickness <= 255 &&
1784 0 <= shift && shift <= XY_SHIFT );
1785
1786 double buf[4];
1787 scalarToRawData(color, buf, img.type(), 0);
1788
1789 if( thickness > 1 || line_type >= CV_AA || shift > 0 )
1790 {
1791 Point2l _center(center.x, center.y);
1792 int64 _radius(radius);
1793 _center.x <<= XY_SHIFT - shift;
1794 _center.y <<= XY_SHIFT - shift;
1795 _radius <<= XY_SHIFT - shift;
1796 EllipseEx( img, _center, Size2l(_radius, _radius),
1797 0, 0, 360, buf, thickness, line_type );
1798 }
1799 else
1800 Circle( img, center, radius, buf, thickness < 0 );
1801}
1802
1803
1804void ellipse( Mat& img, Point center, Size axes,

Callers 1

cvCircleFunction · 0.85

Calls 5

scalarToRawDataFunction · 0.85
EllipseExFunction · 0.85
CircleFunction · 0.85
depthMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected