Method: Magick::Image#rotate

Defined in:
ext/RMagick/rmimage.cpp

#rotate(degrees) ⇒ Magick::Image #rotate(degrees, qualifier) ⇒ Magick::Image

Rotate the receiver by the specified angle. Positive angles rotate clockwise while negative angles rotate counter-clockwise. New pixels introduced by the rotation are the same color as the current background color. Set the background color to “none” to make the new pixels transparent black.

Overloads:

  • #rotate(degrees) ⇒ Magick::Image

    Parameters:

    • degrees (Numeric)

      The number of degrees to rotate the image.

  • #rotate(degrees, qualifier) ⇒ Magick::Image

    Parameters:

    • degrees (Numeric)

      The number of degrees to rotate the image.

    • qualifier (String)

      If present, either “>” or “<”. If “>”, rotates the image only if the image’s width exceeds its height. If “<” rotates the image only if its height exceeds its width. If this argument is omitted the image is always rotated.

Returns:

See Also:



12347
12348
12349
12350
12351
12352
# File 'ext/RMagick/rmimage.cpp', line 12347

VALUE
Image_rotate(int argc, VALUE *argv, VALUE self)
{
    rm_check_destroyed(self);
    return rotate(False, argc, argv, self);
}