### In Files

- wx/classes/point.rb

### Parent

Wx::Object

### Methods

- *
- +
- -
- /
- to_s

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# Wx::Point

### Public Instance Methods

*(mul) click to toggle source

Return a new Wx::Point with the x and y values both multiplied by parameter `mul`, which should be a Numeric

    # File wx/classes/point.rb, line 15
      def *(mul)
        self.class.new( (get_x * mul).to_i, (get_y * mul).to_i )
      end

+(arg) click to toggle source

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

    # File wx/classes/point.rb, line 38
      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

-(arg) click to toggle source

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.

    # 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

/(div) click to toggle source

Return a new Wx::Point with the x and y parameters both divided by parameter `div`, which should be a Numeric

    # File wx/classes/point.rb, line 9
      def /(div)
        self.class.new( (get_x / div).to_i, (get_y / div).to_i )
      end

to_s() click to toggle source

More informative output when converted to string

    # File wx/classes/point.rb, line 3
      def to_s
        "#<Wx::Point: (#{x}, #{y})>"
      end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.