lib/chunky_png/canvas/drawing.rb in chunky_png-0.9.2 vs lib/chunky_png/canvas/drawing.rb in chunky_png-0.10.0

- old
+ new

@@ -3,11 +3,11 @@ module Drawing # Sets a point on the canvas by composing a pixel with its background color. def point(x, y, color) - self[x, y] = ChunkyPNG::Color.compose(color, self[x, y]) + set_pixel(x, y, ChunkyPNG::Color.compose(color, get_pixel(x, y))) end # Draws an anti-aliased line using Xiaolin Wu's algorithm. # def line_xiaolin_wu(x0, y0, x1, y1, color) @@ -61,10 +61,10 @@ end return self end - alias :line :line_xiaolin_wu + alias_method :line, :line_xiaolin_wu def rect(x0, y0, x1, y1, line_color, fill_color = ChunkyPNG::COLOR::TRANSPARENT) # Fill [x0, x1].min.upto([x0, x1].max) do |x|