Skip to content

Commit d103c11

Browse files
authored
Merge pull request opencv#8031 from terfendail:shortline_fix_2.4
Backport of PR opencv#7161 fix for drawing beyond 32768 range
2 parents 19e4c77 + ebae963 commit d103c11

File tree

3 files changed

+364
-156
lines changed

3 files changed

+364
-156
lines changed

modules/core/include/opencv2/core/core.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ template<typename _Tp> class Allocator
407407
The class is specialized for each fundamental numerical data type supported by OpenCV.
408408
It provides DataDepth<T>::value constant.
409409
*/
410-
template<typename _Tp> class DataDepth {};
410+
template<typename _Tp> class DataDepth { public: enum { value = -1, fmt = 0 }; };
411411

412412
template<> class DataDepth<bool> { public: enum { value = CV_8U, fmt=(int)'u' }; };
413413
template<> class DataDepth<uchar> { public: enum { value = CV_8U, fmt=(int)'u' }; };
@@ -880,8 +880,10 @@ template<typename _Tp> class Rect_
880880

881881

882882
typedef Point_<int> Point2i;
883+
typedef Point_<int64> Point2l;
883884
typedef Point2i Point;
884885
typedef Size_<int> Size2i;
886+
typedef Size_<int64> Size2l;
885887
typedef Size_<double> Size2d;
886888
typedef Size2i Size;
887889
typedef Rect_<int> Rect;
@@ -2711,6 +2713,7 @@ CV_EXPORTS_W void polylines(InputOutputArray img, InputArrayOfArrays pts,
27112713

27122714
//! clips the line segment by the rectangle Rect(0, 0, imgSize.width, imgSize.height)
27132715
CV_EXPORTS bool clipLine(Size imgSize, CV_IN_OUT Point& pt1, CV_IN_OUT Point& pt2);
2716+
CV_EXPORTS bool clipLine(Size2l imgSize, CV_IN_OUT Point2l& pt1, CV_IN_OUT Point2l& pt2);
27142717

27152718
//! clips the line segment by the rectangle imgRect
27162719
CV_EXPORTS_W bool clipLine(Rect imgRect, CV_OUT CV_IN_OUT Point& pt1, CV_OUT CV_IN_OUT Point& pt2);
@@ -2748,6 +2751,9 @@ class CV_EXPORTS LineIterator
27482751
CV_EXPORTS_W void ellipse2Poly( Point center, Size axes, int angle,
27492752
int arcStart, int arcEnd, int delta,
27502753
CV_OUT vector<Point>& pts );
2754+
CV_EXPORTS void ellipse2Poly( Point2d center, Size2d axes, int angle,
2755+
int arcStart, int arcEnd, int delta,
2756+
CV_OUT vector<Point2d>& pts );
27512757

27522758
enum
27532759
{

0 commit comments

Comments
 (0)