public Method

Point.-(arg)

Return a new Wx::Point with the x and y values both reduced by parameter arg. If arg is another Wx::Point, reduce x by the other’s x and y by the other’s y; if arg is a numeric value, reduce x and y both by that value.

Source Code

# File wx/classes/point.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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.