Return a new Wx::Size with the width and height values both multiplied by parameter mul, which should be a Numeric
# File wx/classes/size.rb, line 14 def *(mul) self.class.new( (get_x * mul).to_i, (get_y * mul).to_i ) end
Return a new Wx::Size with the width and height parameters both increased by parameter arg. If arg is another Wx::Size, increase width by the other’s width and height by the other’s height; if arg is a numeric value, increase both width and height by that value.
# File wx/classes/size.rb, line 39 def +(arg) case arg when self.class self.class.new( get_x + arg.get_x, get_y + arg.get_y ) when Numeric self.class.new( (get_x + arg).to_i, (get_y + arg).to_i ) else Kernel.raise TypeError, "Cannot add #{arg} to #{self.inspect}" end end
Return a new Wx::Size with the width and height parameters both reduced by parameter arg. If arg is another Wx::Size, reduce width by the other’s width and height by the other’s height; if arg is a numeric value, reduce both width and height by that value.
# File wx/classes/size.rb, line 23 def -(arg) case arg when self.class self.class.new( get_x - arg.get_x, get_y - arg.get_y ) when Numeric self.class.new( (get_x - arg).to_i, (get_y - arg).to_i ) else Kernel.raise TypeError, "Cannot add #{arg} to #{self.inspect}" end end
Return a new Wx::Size with the width and height values both divided by parameter div, which should be a Numeric
# File wx/classes/size.rb, line 8 def /(div) self.class.new( (get_x / div).to_i, (get_y / div).to_i ) end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.