module PerfectShape::PointLocation

Point location usually represents the top-left point in a shape

Attributes

x[R]
y[R]

Public Class Methods

new(x: 0, y: 0) click to toggle source

Calls super before setting x,y (default: 0,0)

Calls superclass method
# File lib/perfect_shape/point_location.rb, line 28
def initialize(x: 0, y: 0)
  super()
  self.x = x
  self.y = y
end

Public Instance Methods

min_x() click to toggle source

Returns x by default. Subclasses may override.

# File lib/perfect_shape/point_location.rb, line 45
def min_x
  x
end
min_y() click to toggle source

Returns y by default. Subclasses may override.

# File lib/perfect_shape/point_location.rb, line 50
def min_y
  y
end
x=(value) click to toggle source

Sets x, normalizing to BigDecimal

# File lib/perfect_shape/point_location.rb, line 35
def x=(value)
  @x = BigDecimal(value.to_s)
end
y=(value) click to toggle source

Sets y, normalizing to BigDecimal

# File lib/perfect_shape/point_location.rb, line 40
def y=(value)
  @y = BigDecimal(value.to_s)
end