module ChunkyPNG

def self.Point(*args)

Other tags:
    See: ChunkyPNG::Point -

Raises:
  • (ArgumentError) - if the arguments weren't understood.

Returns:
  • (ChunkyPNG::Point) -
  • (ChunkyPNG::Point) - The instantiated point.
  • (ChunkyPNG::Point) - The instantiated point.
  • (ChunkyPNG::Point) - The instantiated point.
  • (ChunkyPNG::Point) - The instantiated point.

Parameters:
  • string (String) -- A string that contains the coordinates, e.g. '0, 4',
  • array (Hash) -- A hash with the :x or 'x' and :y or
  • array (Array) -- A two element array which represent the x- and y-coordinate.
  • y (Integer, :to_i) -- The y-coordinate
  • x (Integer, :to_i) -- The x-coordinate

Overloads:
  • Point(string)
  • Point(hash)
  • Point(array)
  • Point(x, y)
def self.Point(*args)
  case args.length
  when 2 then ChunkyPNG::Point.new(*args)
  when 1 then build_point_from_object(args.first)
  else raise ArgumentError,
    "Don't know how to construct a point from #{args.inspect}!"
  end
end