module ChunkyPNG::Canvas::Operations

def rotate_right!

Other tags:
    See: #rotate_right - for a version that leaves the current canvas intact

Returns:
  • (ChunkyPNG::Canvas) - Itself, but rotated clockwise.
def rotate_right!
  new_pixels = []
  0.upto(width - 1) { |i| new_pixels += column(i).reverse }
  replace_canvas!(height, width, new_pixels)
end