src/main/java/org/gm4java/im4java/GMOperation.java
public GMOperation rotate(final double degrees, final RotationAnnotation annotation) {
        if (annotation == null) {
            throw new IllegalArgumentException("Rotation annotation must be defined");
        }
        final List<String> args = getCmdArgs();
        args.add("-rotate");
        args.add(String.format(Locale.ENGLISH,"%.1f%s", degrees, annotation.asAnnotation()));
        return this;
    }
public GMOperation rotate(final double degrees, final RotationAnnotation annotation) {
        if (annotation == null) {
            throw new IllegalArgumentException("Rotation annotation must be defined");
        }
        final List<String> args = getCmdArgs();
        args.add("-rotate");
        args.add(String.format(Locale.ENGLISH,"%.1f%s", degrees, annotation.asAnnotation()));
        return this;
    }
Rotates the image, with empty triangles back-filled using default background color.

@param degrees
The angle by which the image should be rotated. Positive numbers indicate clockwise direction;
negative numbers indicate counterclockwise direction.
@param annotation
Rotate annotation to define when rotation should happen.
@return Builder object for chained options setup.