lib/chunky_png/canvas/operations.rb in chunky_png-0.9.2 vs lib/chunky_png/canvas/operations.rb in chunky_png-0.10.0
- old
+ new
@@ -27,10 +27,10 @@
def compose(other, offset_x = 0, offset_y = 0)
check_size_constraints!(other, offset_x, offset_y)
for y in 0...other.height do
for x in 0...other.width do
- self[x + offset_x, y + offset_y] = ChunkyPNG::Color.compose(other[x, y], self[x + offset_x, y + offset_y])
+ set_pixel(x + offset_x, y + offset_y, ChunkyPNG::Color.compose(other.get_pixel(x, y), get_pixel(x + offset_x, y + offset_y)))
end
end
self
end