module ChunkyPNG::Canvas::Operations
def compose(new_foreground, dx = 0, dy = 0)
def compose(new_foreground, dx = 0, dy = 0) check_size_constraints!(new_foreground, dx, dy) for y in 0...new_foreground.height do for x in 0...new_foreground.width do self[x+dx, y+dy] = ChunkyPNG::Color.compose(new_foreground[x, y], self[x+dx, y+dy]) end end self end