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
* @scope class
* @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 number or symbol (included in CvCapture::INTERFACE), reads video stream from a device.
* * 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
* @overload codes
* @return [Array<Fixnum>] Chain codes
* @return [Array<Integer>] Chain codes
* @opencv_func cvStartReadChainPoints
* @opencv_func CV_READ_SEQ_ELEM
*/

View file

@ -44,14 +44,14 @@ rb_allocate(VALUE klass)
* Constructor
*
* @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.
* - Element type:
* - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint}
* - <tt>CV_32FC2</tt>: {CvPoint2D32f}
* - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f}
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Fixnum
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Fixnum (Freeman code)
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Integer
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Integer (Freeman code)
* - Sequence type:
* - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence
* - <tt>CV_SEQ_KIND_CURVE</tt>: Curve

View file

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

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvPoint
*
* 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.
* typdef struct CvPoint {

View file

@ -53,7 +53,7 @@ rb_allocate(VALUE klass)
* call-seq:
* 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
rb_initialize(int argc, VALUE *argv, VALUE self)

View file

@ -146,14 +146,14 @@ class2seq_flags_value(VALUE klass) {
* Constructor
*
* @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.
* - Element type:
* - <tt>CV_SEQ_ELTYPE_POINT</tt>: {CvPoint}
* - <tt>CV_32FC2</tt>: {CvPoint2D32f}
* - <tt>CV_SEQ_ELTYPE_POINT3D</tt>: {CvPoint3D32f}
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Fixnum
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Fixnum (Freeman code)
* - <tt>CV_SEQ_ELTYPE_INDEX</tt>: Integer
* - <tt>CV_SEQ_ELTYPE_CODE</tt>: Integer (Freeman code)
* - Sequence type:
* - <tt>CV_SEQ_KIND_GENERIC</tt>: Generic sequence
* - <tt>CV_SEQ_KIND_CURVE</tt>: Curve

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvSize
*
* 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.
* typdef struct CvSize {

View file

@ -12,7 +12,7 @@
* Document-class: OpenCV::CvTwoPoints
*
* 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.
* typdef struct CvTwopoints {

View file

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

View file

@ -47,7 +47,7 @@ void trackbar_free(void *ptr) {
*
* Create new Trackbar.
* <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.
*/
VALUE rb_initialize(int argc, VALUE *argv, VALUE self) {

View file

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

View file

@ -42,7 +42,7 @@ class TestCvChain < OpenCVTestCase
}
chain = mat0.find_contours(:mode => CV_RETR_EXTERNAL, :method => CV_CHAIN_CODE)
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
def test_points

View file

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