1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

Fix Fixnum's in documentation and in tests

This commit is contained in:
Lars Kanis 2017-02-10 12:43:54 +01:00
parent af14c1dd94
commit 50cf19c356
14 changed files with 22 additions and 22 deletions

View file

@ -39,7 +39,7 @@ cvcapture_free(void *ptr)
* Open video file or a capturing device for video capturing * Open video file or a capturing device for video capturing
* @scope class * @scope class
* @overload open(dev = nil) * @overload open(dev = nil)
* @param dev [String,Fixnum,Simbol,nil] Video capturing device * @param dev [String,Integer,Simbol,nil] Video capturing device
* * If dev is a string (i.e "stream.avi"), reads video stream from a file. * * If dev is a string (i.e "stream.avi"), reads video stream from a file.
* * If dev is a number or symbol (included in CvCapture::INTERFACE), reads video stream from a device. * * If dev is a number or symbol (included in CvCapture::INTERFACE), reads video stream from a device.
* * If dev is a nil, same as CvCapture.open(:any) * * If dev is a nil, same as CvCapture.open(:any)

View file

@ -95,7 +95,7 @@ rb_set_origin(VALUE self, VALUE origin)
/* /*
* Returns the chain codes * Returns the chain codes
* @overload codes * @overload codes
* @return [Array<Fixnum>] Chain codes * @return [Array<Integer>] Chain codes
* @opencv_func cvStartReadChainPoints * @opencv_func cvStartReadChainPoints
* @opencv_func CV_READ_SEQ_ELEM * @opencv_func CV_READ_SEQ_ELEM
*/ */

View file

@ -44,14 +44,14 @@ rb_allocate(VALUE klass)
* Constructor * Constructor
* *
* @overload new(seq_flags = CV_SEQ_ELTYPE_POINT | CV_SEQ_KIND_GENERIC, storage = nil) * @overload new(seq_flags = CV_SEQ_ELTYPE_POINT | CV_SEQ_KIND_GENERIC, storage = nil)
* @param [Fixnum] seq_flags Flags of the created sequence, which are combinations of * @param [Integer] seq_flags Flags of the created sequence, which are combinations of
* the element types and sequence types. * the element types and sequence types.
* - Element type: * - Element type:
* - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint} * - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint}
* - <tt>CV_32FC2</tt>: {CvPoint2D32f} * - <tt>CV_32FC2</tt>: {CvPoint2D32f}
* - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f} * - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f}
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Fixnum * - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Integer
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Fixnum (Freeman code) * - <tt>CV_SEQ_ELTYPE_CODE</tt>: Integer (Freeman code)
* - Sequence type: * - Sequence type:
* - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence * - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence
* - <tt>CV_SEQ_KIND_CURVE</tt>: Curve * - <tt>CV_SEQ_KIND_CURVE</tt>: Curve

View file

@ -108,7 +108,7 @@ rb_initialize(int argc, VALUE *argv, VALUE self)
/* /*
* Returns font face * Returns font face
* @overload face * @overload face
* @return [Fixnum] Font face * @return [Integer] Font face
*/ */
VALUE VALUE
rb_face(VALUE self) rb_face(VALUE self)
@ -152,7 +152,7 @@ rb_shear(VALUE self)
/* /*
* Returns thickness * Returns thickness
* @overload thickness * @overload thickness
* @return [Fixnum] thickness * @return [Integer] thickness
*/ */
VALUE VALUE
rb_thickness(VALUE self) rb_thickness(VALUE self)
@ -163,7 +163,7 @@ rb_thickness(VALUE self)
/* /*
* Returns line type * Returns line type
* @overload line_type * @overload line_type
* @return [Fixnum] line_type * @return [Integer] line_type
*/ */
VALUE VALUE
rb_line_type(VALUE self) rb_line_type(VALUE self)

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvPoint * Document-class: OpenCV::CvPoint
* *
* This class means one point on X axis Y axis. * This class means one point on X axis Y axis.
* X and Y takes the value of the Fixnum. see also CvPoint2D32F * X and Y takes the value of the Integer. see also CvPoint2D32F
* *
* C structure is here, very simple. * C structure is here, very simple.
* typdef struct CvPoint { * typdef struct CvPoint {

View file

@ -53,7 +53,7 @@ rb_allocate(VALUE klass)
* call-seq: * call-seq:
* new([d1][,d2][,d3][,d4]) * new([d1][,d2][,d3][,d4])
* *
* Create new Scalar. Argument should be Fixnum (or nil as 0). * Create new Scalar. Argument should be Integer (or nil as 0).
*/ */
VALUE VALUE
rb_initialize(int argc, VALUE *argv, VALUE self) rb_initialize(int argc, VALUE *argv, VALUE self)

View file

@ -146,14 +146,14 @@ class2seq_flags_value(VALUE klass) {
* Constructor * Constructor
* *
* @overload new(seq_flags, storage = nil) * @overload new(seq_flags, storage = nil)
* @param [Fixnum] seq_flags Flags of the created sequence, which are combinations of * @param [Integer] seq_flags Flags of the created sequence, which are combinations of
* the element types and sequence types. * the element types and sequence types.
* - Element type: * - Element type:
* - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint} * - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint}
* - <tt>CV_32FC2</tt>: {CvPoint2D32f} * - <tt>CV_32FC2</tt>: {CvPoint2D32f}
* - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f} * - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f}
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Fixnum * - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Integer
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Fixnum (Freeman code) * - <tt>CV_SEQ_ELTYPE_CODE</tt>: Integer (Freeman code)
* - Sequence type: * - Sequence type:
* - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence * - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence
* - <tt>CV_SEQ_KIND_CURVE</tt>: Curve * - <tt>CV_SEQ_KIND_CURVE</tt>: Curve

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvSize * Document-class: OpenCV::CvSize
* *
* This class means one size on X axis Y axis. * This class means one size on X axis Y axis.
* X and Y takes the value of the Fixnum. * X and Y takes the value of the Integer.
* *
* C structure is here, very simple. * C structure is here, very simple.
* typdef struct CvSize { * typdef struct CvSize {

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvTwoPoints * Document-class: OpenCV::CvTwoPoints
* *
* This class means one twopoints on X axis Y axis. * This class means one twopoints on X axis Y axis.
* X and Y takes the value of the Fixnum. see also CvTwopoints2D32F * X and Y takes the value of the Integer. see also CvTwopoints2D32F
* *
* C structure is here, very simple. * C structure is here, very simple.
* typdef struct CvTwopoints { * typdef struct CvTwopoints {

View file

@ -193,7 +193,7 @@ rb_reset_roi(VALUE self)
} }
/* /*
* Return COI as Fixnum. * Return COI as Integer.
*/ */
VALUE VALUE
rb_get_coi(VALUE self) rb_get_coi(VALUE self)
@ -213,7 +213,7 @@ rb_get_coi(VALUE self)
* set_coi(coi) * set_coi(coi)
* set_coi(coi){|image| ...} * set_coi(coi){|image| ...}
* *
* Set COI. <i>coi</i> should be Fixnum. * Set COI. <i>coi</i> should be Integer.
* Return self. * Return self.
*/ */
VALUE VALUE

View file

@ -47,7 +47,7 @@ void trackbar_free(void *ptr) {
* *
* Create new Trackbar. * Create new Trackbar.
* <i>name</i> should be String. * <i>name</i> should be String.
* <i>maxval</i> and <i>val</i> should be Fixnum. * <i>maxval</i> and <i>val</i> should be Integer.
* When Trackbar adjuster changed, block will be called. * When Trackbar adjuster changed, block will be called.
*/ */
VALUE rb_initialize(int argc, VALUE *argv, VALUE self) { VALUE rb_initialize(int argc, VALUE *argv, VALUE self) {

View file

@ -18,7 +18,7 @@ class TestCvAvgComp < OpenCVTestCase
end end
def test_neighbors def test_neighbors
assert_equal(Fixnum, @avgcomp.neighbors.class) assert_kind_of(Integer, @avgcomp.neighbors)
end end
end end

View file

@ -42,7 +42,7 @@ class TestCvChain < OpenCVTestCase
} }
chain = mat0.find_contours(:mode => CV_RETR_EXTERNAL, :method => CV_CHAIN_CODE) chain = mat0.find_contours(:mode => CV_RETR_EXTERNAL, :method => CV_CHAIN_CODE)
assert_equal(Array, chain.codes.class) assert_equal(Array, chain.codes.class)
assert(chain.codes.all? { |a| (a.class == Fixnum) and (a >= 0 and a <= 7) }) assert(chain.codes.all? { |a| (Integer === a) and (a >= 0 and a <= 7) })
end end
def test_points def test_points

View file

@ -67,7 +67,7 @@ class TestCvSeq < OpenCVTestCase
seq2 = CvSeq.new(CV_SEQ_ELTYPE_INDEX) seq2 = CvSeq.new(CV_SEQ_ELTYPE_INDEX)
seq2.push(10, 20, 30) seq2.push(10, 20, 30)
assert_equal(Fixnum, seq2[0].class) assert_kind_of(Integer, seq2[0])
assert_equal(10, seq2[0]) assert_equal(10, seq2[0])
assert_equal(20, seq2[1]) assert_equal(20, seq2[1])
assert_equal(30, seq2[2]) assert_equal(30, seq2[2])
@ -101,7 +101,7 @@ class TestCvSeq < OpenCVTestCase
seq4 = CvSeq.new(CV_SEQ_ELTYPE_INDEX).push(20, 30) seq4 = CvSeq.new(CV_SEQ_ELTYPE_INDEX).push(20, 30)
seq3.push(seq4) seq3.push(seq4)
assert_equal(3, seq3.total) assert_equal(3, seq3.total)
assert_equal(Fixnum, seq3[0].class) assert_kind_of(Integer, seq3[0])
assert_equal(10, seq3[0]) assert_equal(10, seq3[0])
assert_equal(20, seq3[1]) assert_equal(20, seq3[1])
assert_equal(30, seq3[2]) assert_equal(30, seq3[2])