Package 

Class Rotate

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static boolean ROTATE_QUALITY
    • Method Summary

      Modifier and Type Method Description
      static Pix rotate(Pix pixs, float degrees) Performs rotation using the default parameters.
      static Pix rotate(Pix pixs, float degrees, boolean quality) Performs rotation with resizing using the default parameters.
      static Pix rotate(Pix pixs, float degrees, boolean quality, boolean resize) Performs basic image rotation about the center.
      static Pix rotateOrth(Pix pixs, @IntRange(from = 0, to = 3) int quads) Performs top-level rotation by multiples of 90 degrees.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rotate

         static Pix rotate(Pix pixs, float degrees)

        Performs rotation using the default parameters.

        Parameters:
        pixs - The source pix.
        degrees - The number of degrees to rotate; clockwise is positive.
      • rotate

         static Pix rotate(Pix pixs, float degrees, boolean quality)

        Performs rotation with resizing using the default parameters.

        Parameters:
        pixs - The source pix.
        degrees - The number of degrees to rotate; clockwise is positive.
        quality - Whether to use high-quality rotation.
      • rotate

         static Pix rotate(Pix pixs, float degrees, boolean quality, boolean resize)

        Performs basic image rotation about the center.

        Notes:

        • Rotation is about the center of the image.
        • For very small rotations, just return a clone.
        • Rotation brings either white or black pixels in from outside theimage.
        • Above 20 degrees, if rotation by shear is requested, we rotate bysampling.
        • Colormaps are removed for rotation by area map and shear.
        • The dest can be expanded so that no image pixels are lost. To invokeexpansion, input the original width and height. For repeated rotation,use of the original width and height allows the expansion to stop at themaximum required size, which is a square with side = sqrt(w*w + h*h).
        Parameters:
        pixs - The source pix.
        degrees - The number of degrees to rotate; clockwise is positive.
        quality - Whether to use high-quality rotation.
        resize - Whether to expand the output so that no pixels are lost.
      • rotateOrth

         static Pix rotateOrth(Pix pixs, @IntRange(from = 0, to = 3) int quads)

        Performs top-level rotation by multiples of 90 degrees.

        Parameters:
        pixs - The source pix (all depths)
        quads - 0-3; number of 90 degree cw rotations