lib/chunky_png/canvas/operations.rb
# Rotates the image 90 degrees clockwise in place.
#
# This method will change the current canvas.
#
# @return [ChunkyPNG::Canvas] Itself, but rotated clockwise.
# @see #rotate_right for a version that leaves the current canvas intact
Rotates the image 90 degrees clockwise in place.
This method will change the current canvas.
Rotates the image 90 degrees clockwise in place . This method will change the current canvas .
def rotate_right!
        new_pixels = []
        0.upto(width - 1) { |i| new_pixels += column(i).reverse }
        replace_canvas!(height, width, new_pixels)
      end
def rotate_right! new_pixels = [ ] 0 . upto ( width - 1 ) { | i | new_pixels += column ( i ) . reverse } replace_canvas! ( height , width , new_pixels ) end
Rotates the image 90 degrees clockwise in place.
Rotates the image 90 degrees clockwise in place .
Itself, but rotated clockwise.
Itself but rotated clockwise .
ChunkyPNG::Canvas
see
rotate_right for a version that leaves the current canvas intact
rotate_right for a version that leaves the current canvas intact