mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
add documents of CvBox2D
This commit is contained in:
parent
ef0eed8874
commit
15a524bb20
1 changed files with 32 additions and 35 deletions
|
@ -11,12 +11,7 @@
|
|||
/*
|
||||
* Document-class: OpenCV::CvBox2D
|
||||
*
|
||||
* C structure is here.
|
||||
* typdef struct CvBox2D {
|
||||
* CvPoint2D32f center; // center of the box.
|
||||
* CvSize2D32f size; // box width and length
|
||||
* float angle; // angle between the horizonal axis and the first side (i.e length) in radians
|
||||
* } CvBox2D;
|
||||
* Stores coordinates of a rotated rectangle.
|
||||
*/
|
||||
__NAMESPACE_BEGIN_OPENCV
|
||||
__NAMESPACE_BEGIN_CVBOX2D
|
||||
|
@ -60,10 +55,12 @@ rb_allocate(VALUE klass)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* CvBox2D.new(<i>[center][, size][, angle]</i>) -> cvbox2d
|
||||
*
|
||||
* Create a box
|
||||
* @overload new(center=nil, size=nil, angle=nil)
|
||||
* @param center [CvPoint2D32f,nil] Center of the box
|
||||
* @param size [CvSize,nil] Size of the box
|
||||
* @param angle [Number,nil] Angle between the horizontal axis and the first side in degrees
|
||||
* @return [CvBox2D] New box
|
||||
*/
|
||||
VALUE
|
||||
rb_initialize(int argc, VALUE *argv, VALUE self)
|
||||
|
@ -84,9 +81,9 @@ rb_initialize(int argc, VALUE *argv, VALUE self)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* center -> cvpoint2d32f
|
||||
* Return center point of box as CvPoint2D32f.
|
||||
* Returns center point of the box
|
||||
* @overload center
|
||||
* @return [CvPoint2D32f] Center of the box
|
||||
*/
|
||||
VALUE
|
||||
rb_center(VALUE self)
|
||||
|
@ -95,10 +92,10 @@ rb_center(VALUE self)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* center = <i>value</i>
|
||||
*
|
||||
* Set center to <i>value</i>
|
||||
* Set center point of the box
|
||||
* @overload center=value
|
||||
* @param value [CvPoint2D32f] Center of the box
|
||||
* @return [CvBox2D] self
|
||||
*/
|
||||
VALUE
|
||||
rb_set_center(VALUE self, VALUE value)
|
||||
|
@ -108,9 +105,9 @@ rb_set_center(VALUE self, VALUE value)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* size -> cvsize2d32f
|
||||
* Return size of box as CvSize2D32f.
|
||||
* Returns size of the box
|
||||
* @overload size
|
||||
* @return [CvSize2D32f] Size of the box
|
||||
*/
|
||||
VALUE
|
||||
rb_size(VALUE self)
|
||||
|
@ -119,10 +116,10 @@ rb_size(VALUE self)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* size = <i>value</i>
|
||||
*
|
||||
* Set size to <i>value</i>
|
||||
* Set size of the box
|
||||
* @overload size=value
|
||||
* @param value [CvSize2D32f] Size of the box
|
||||
* @return [CvBox2D] self
|
||||
*/
|
||||
VALUE
|
||||
rb_set_size(VALUE self, VALUE value)
|
||||
|
@ -132,10 +129,9 @@ rb_set_size(VALUE self, VALUE value)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* angle -> float
|
||||
*
|
||||
* Return angle of box as Float.
|
||||
* Returns angle of the box
|
||||
* @overload angle
|
||||
* @return [Float] Angle of the box
|
||||
*/
|
||||
VALUE
|
||||
rb_angle(VALUE self)
|
||||
|
@ -144,10 +140,10 @@ rb_angle(VALUE self)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* angle = <i>value</i>
|
||||
*
|
||||
* Set angle to <i>value</i>
|
||||
* Set angle of the box
|
||||
* @overload angle=value
|
||||
* @param value [Number] Angle of the box
|
||||
* @return [CvBox2D] self
|
||||
*/
|
||||
VALUE
|
||||
rb_set_angle(VALUE self, VALUE value)
|
||||
|
@ -157,9 +153,10 @@ rb_set_angle(VALUE self, VALUE value)
|
|||
}
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* points -> array(include cvpoint2d32f)
|
||||
* Find box vertices. Return Array contain 4 CvPoint2D32f.
|
||||
* Find box vertices
|
||||
* @overload points
|
||||
* @return [Array<CvPoint2D32f>] Vertices of the box
|
||||
* @opencv_func cvBoxPoints
|
||||
*/
|
||||
VALUE
|
||||
rb_points(VALUE self)
|
||||
|
|
Loading…
Add table
Reference in a new issue