Method: Rect#bottomleft=

Defined in:
lib/gamebox/lib/rect.rb

#bottomleft=(bottomleft) ⇒ Object Also known as: bl=

Set the x and y coordinates of the bottom-left corner of the Rect by translating the Rect (adjusting the x and y offsets).

Raises:

  • (ArgumentError)


282
283
284
285
286
# File 'lib/gamebox/lib/rect.rb', line 282

def bottomleft=(bottomleft)
  raise ArgumentError, "Rect#bottomleft= takes an Array of form [x, y]." if bottomleft.size != 2
  self[0], self.bottom = bottomleft
  return bottomleft
end