module ChunkyPNG::Canvas::Operations

def check_size_constraints!(other, offset_x, offset_y)

Raises:
  • (ChunkyPNG::OutOfBounds) - when the other image doesn't fit.

Parameters:
  • offset_y (Integer) -- The y offset on which the other image will be applied.
  • offset_x (Integer) -- The x offset on which the other image will be applied.
  • other (ChunkyPNG::Canvas) -- The other canvas
def check_size_constraints!(other, offset_x, offset_y)
  raise ChunkyPNG::OutOfBounds, "Background image width is too small!"  if width  < other.width  + offset_x
  raise ChunkyPNG::OutOfBounds, "Background image height is too small!" if height < other.height + offset_y
end