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
19796 19797 19798 19799 19800 19801 19802 19803 19804 19805 19806 19807 19808 19809 19810 19811 19812 19813 19814 19815 19816 19817 19818 19819 19820 19821 19822 19823 19824 19825 19826 19827 19828 19829 19830 19831 19832 19833 19834 19835 19836 19837 19838 19839 19840 19841 19842 19843 19844 19845 19846 19847 19848 19849 19850 19851 19852 19853 19854 19855 19856 19857 19858 |
# File 'lib/ropencv/ropencv_types.rb', line 19796 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_2f__2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_size_2f_size_2f__2_defaults1[i] end begin return Rbind::cv_size_2f_size_2f__2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Size2f::Size2f(const cv::Point2f pt) @@cv_size_2f_size_2f__3_defaults2 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_size_2f_size_2f__3_defaults2[i] end begin return Rbind::cv_size_2f_size_2f__3(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Size2f::Size2f(float width, float height) @@cv_size_2f_size_2f__4_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_2f__4_defaults3[i] end begin return Rbind::cv_size_2f_size_2f__4(*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
19781 19782 19783 |
# File 'lib/ropencv/ropencv_types.rb', line 19781 def self.null new(Size2fStruct.new) end |
Instance Method Details
#area ⇒ Float
Note:
method wrapper for float cv::Size2f::area()
19969 19970 19971 19972 |
# File 'lib/ropencv/ropencv_types.rb', line 19969 def area() __validate_pointer__ Rbind::cv_size_2f_area( self) end |
#height ⇒ Float Also known as: get_height
Note:
method wrapper for float height
19952 19953 19954 19955 |
# File 'lib/ropencv/ropencv_types.rb', line 19952 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
19961 19962 19963 19964 |
# File 'lib/ropencv/ropencv_types.rb', line 19961 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
19924 19925 19926 |
# File 'lib/ropencv/ropencv_types.rb', line 19924 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
19935 19936 19937 19938 |
# File 'lib/ropencv/ropencv_types.rb', line 19935 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
19944 19945 19946 19947 |
# File 'lib/ropencv/ropencv_types.rb', line 19944 def width=(value) __validate_pointer__ Rbind::cv_size_2f_set_width( self, value) end |