| 1775 | |
| 1776 | |
| 1777 | void 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 | |
| 1804 | void ellipse( Mat& img, Point center, Size axes, |