lib/chunky_png/canvas/operations.rb
# Flips the image horizontally in place.
#
# This will flip the image on its horizontal axis, e.g. pixels on the top
# will now be pixels on the bottom. Chaining this method twice will
# return the original canvas. This method will leave the original object
# intact and return a new canvas.
#
# @return [ChunkyPNG::Canvas] Itself, but flipped
# @see #flip_horizontally
Flips the image horizontally in place.
This will flip the image on its horizontal axis, e.g. pixels on the top
will now be pixels on the bottom. Chaining this method twice will
return the original canvas. This method will leave the original object
intact and return a new canvas.
Flips the image horizontally in place . This will flip the image on its horizontal axis e . g . pixels on the top will now be pixels on the bottom . Chaining this method twice will return the original canvas . This method will leave the original object intact and return a new canvas .
def flip_horizontally!
        for y in 0..((height - 1) >> 1) do
          other_y   = height - (y + 1)
          other_row = row(other_y)
          replace_row!(other_y, row(y))
          replace_row!(y, other_row)
        end
        self
      end
def flip_horizontally! for y in 0 .. ( ( height - 1 ) >> 1 ) do other_y = height - ( y + 1 ) other_row = row ( other_y ) replace_row! ( other_y , row ( y ) ) replace_row! ( y , other_row ) end self end
Flips the image horizontally in place.
Flips the image horizontally in place .
Itself, but flipped
Itself but flipped
ChunkyPNG::Canvas
see
None