Class: Wx::RealPoint

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/wx/doc/gen/gdi_common.rb,
lib/wx/doc/gdi_common.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

A RealPoint is a useful data structure for graphics operations.

It contains floating point x and y members. See Point for an integer version. Note that the coordinates stored inside a RealPoint object may be negative and that RealPoint functions do not perform any check against negative values.

Category: Data Structures

See Also:

Instance Method Summary collapse

Constructor Details

#initializeWx::RealPoint #initialize(x, y) ⇒ Wx::RealPoint #initialize(pt) ⇒ Wx::RealPoint

Returns a new instance of RealPoint.

Overloads:

  • #initializeWx::RealPoint

    Initializes to zero the x and y members.

  • #initialize(x, y) ⇒ Wx::RealPoint

    Initializes the point with the given coordinates.

    Parameters:

    • x (Float)
    • y (Float)
  • #initialize(pt) ⇒ Wx::RealPoint

    Converts the given Point (with integer coordinates) to a Wx::RealPoint.

    Parameters:



1006
# File 'lib/wx/doc/gen/gdi_common.rb', line 1006

def initialize(*args) end

Instance Method Details

#*(num) ⇒ Wx::RealPoint

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

Parameters:

  • num (Numeric)

Returns:



187
# File 'lib/wx/doc/gdi_common.rb', line 187

def *(num) end

#+(arg) ⇒ Wx::RealPoint

Return a new Wx::RealPoint with the x and y values both increased by parameter arg. If arg is another Wx::(Real)Point (or Wx::Size or 2-element array), increase x by the other’s x (or width) and y by the other’s y (or height); if arg is a numeric value, increase both x and y by that value.

Parameters:

Returns:



203
# File 'lib/wx/doc/gdi_common.rb', line 203

def +(arg) end

#-(arg) ⇒ Wx::RealPoint

Return a new Wx::RealPoint with the x and y values both reduced by parameter arg. If arg is another Wx::(Real)Point (or Wx::Size or 2-element array), reduce x by the other’s x (or width) and y by the other’s y (or height); if arg is a numeric value, reduce x and y both by that value.

Parameters:

Returns:



195
# File 'lib/wx/doc/gdi_common.rb', line 195

def -(arg) end

#/(num) ⇒ Wx::RealPoint

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

Parameters:

  • num (Numeric)

Returns:



181
# File 'lib/wx/doc/gdi_common.rb', line 181

def /(num) end

#<=>(other) ⇒ Boolean?

Compare point values (Wx::RealPoint or point array). Returns -1,0 or 1 to indicate if this point is smaller, equal or greater than other (comparing xy with other.xother.y). Returns nil if incompatible.

Parameters:

Returns:

  • (Boolean, nil)


167
# File 'lib/wx/doc/gdi_common.rb', line 167

def <=>(other)end

#==(other) ⇒ Boolean

Compare point values (Wx::RealPoint or point array). Throws exception if incompatible.

Parameters:

Returns:

  • (Boolean)


160
# File 'lib/wx/doc/gdi_common.rb', line 160

def ==(other)end

#assign(pt) ⇒ self

Set this point to the given point’s x,y values

Parameters:

Returns:

  • (self)


217
# File 'lib/wx/doc/gdi_common.rb', line 217

def assign(pt) end

#eql?(other) ⇒ Boolean

Compare points.

Parameters:

Returns:

  • (Boolean)


172
# File 'lib/wx/doc/gdi_common.rb', line 172

def eql?(other)end

#hashObject

Returns hash for point



175
# File 'lib/wx/doc/gdi_common.rb', line 175

def hash; end

#to_aryArray(Float,Float)

Returns point array ([x, y])

Returns:

  • (Array(Float,Float))

    point as array



155
# File 'lib/wx/doc/gdi_common.rb', line 155

def to_ary; end

#to_pointWx::Point

Converts real point to Wx::Point

Returns:

  • (Wx::Point)

    Wx::Point instance from real point coordinates



207
# File 'lib/wx/doc/gdi_common.rb', line 207

def to_point; end

#to_real_pointself Also known as: to_real

Returns self.

Returns:

  • (self)


211
# File 'lib/wx/doc/gdi_common.rb', line 211

def to_real_point; end

#xFloat

X coordinate of this point.

Returns:

  • (Float)


974
# File 'lib/wx/doc/gen/gdi_common.rb', line 974

def x; end

#x=(val) ⇒ void

This method returns an undefined value.

X coordinate of this point.

Parameters:

  • val (Float)


980
# File 'lib/wx/doc/gen/gdi_common.rb', line 980

def x=(val); end

#yFloat

Y coordinate of this point.

Returns:

  • (Float)


986
# File 'lib/wx/doc/gen/gdi_common.rb', line 986

def y; end

#y=(val) ⇒ void

This method returns an undefined value.

Y coordinate of this point.

Parameters:

  • val (Float)


992
# File 'lib/wx/doc/gen/gdi_common.rb', line 992

def y=(val); end