Class: OpenCV::Cv::Size2f
- Inherits:
-
Object
- Object
- OpenCV::Cv::Size2f
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #area ⇒ Float
- #height ⇒ Float (also: #get_height)
- #height=(value) ⇒ Void (also: #set_height)
-
#to_s ⇒ Object
converts Size2f into a string by crawling through all its attributes.
-
#width ⇒ Float
(also: #get_width)
methods.
- #width=(value) ⇒ Void (also: #set_width)
Class Method Details
.size_2f ⇒ Object .size_2f(sz) ⇒ Object .size_2f(pt) ⇒ Object .size_2f(width, height) ⇒ Object
10572 10573 10574 10575 10576 10577 10578 10579 10580 10581 10582 10583 10584 10585 10586 10587 10588 10589 10590 10591 10592 10593 10594 10595 10596 10597 10598 10599 10600 10601 10602 10603 10604 10605 10606 10607 10608 10609 10610 10611 10612 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 10631 10632 10633 10634 |
# File 'lib/ropencv/ropencv_types.rb', line 10572 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Size2fStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for cv::Size2f::Size2f() @@cv_size_2f_size_2f_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_size_2f_size_2f_defaults0[i] end begin return Rbind::cv_size_2f_size_2f(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Size2f::Size2f(const cv::Size2f sz) @@cv_size_2f_size_2f2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_size_2f_size_2f2_defaults1[i] end begin return Rbind::cv_size_2f_size_2f2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Size2f::Size2f(const cv::Point2f pt) @@cv_size_2f_size_2f3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_size_2f_size_2f3_defaults2[i] end begin return Rbind::cv_size_2f_size_2f3(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Size2f::Size2f(float width, float height) @@cv_size_2f_size_2f4_defaults3 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_size_2f_size_2f4_defaults3[i] end begin return Rbind::cv_size_2f_size_2f4(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
10557 10558 10559 |
# File 'lib/ropencv/ropencv_types.rb', line 10557 def self.null new(Size2fStruct.new) end |
Instance Method Details
#area ⇒ Float
Note:
method wrapper for float cv::Size2f::area()
10745 10746 10747 10748 |
# File 'lib/ropencv/ropencv_types.rb', line 10745 def area() __validate_pointer__ Rbind::cv_size_2f_area( self) end |
#height ⇒ Float Also known as: get_height
Note:
method wrapper for float height
10728 10729 10730 10731 |
# File 'lib/ropencv/ropencv_types.rb', line 10728 def height() __validate_pointer__ Rbind::cv_size_2f_get_height( self) end |
#height=(value) ⇒ Void Also known as: set_height
Note:
method wrapper for float height
10737 10738 10739 10740 |
# File 'lib/ropencv/ropencv_types.rb', line 10737 def height=(value) __validate_pointer__ Rbind::cv_size_2f_set_height( self, value) end |
#to_s ⇒ Object
converts Size2f into a string by crawling through all its attributes
10700 10701 10702 |
# File 'lib/ropencv/ropencv_types.rb', line 10700 def to_s "#<cv::Size2f width=#{self.width} height=#{self.height}>" end |
#width ⇒ Float Also known as: get_width
Note:
method wrapper for float width
methods
10711 10712 10713 10714 |
# File 'lib/ropencv/ropencv_types.rb', line 10711 def width() __validate_pointer__ Rbind::cv_size_2f_get_width( self) end |
#width=(value) ⇒ Void Also known as: set_width
Note:
method wrapper for float width
10720 10721 10722 10723 |
# File 'lib/ropencv/ropencv_types.rb', line 10720 def width=(value) __validate_pointer__ Rbind::cv_size_2f_set_width( self, value) end |