Class ImageAnimation.Loop

java.lang.Object
limn.animation.ImageAnimation.Loop
Enclosing class:
ImageAnimation

public static final class ImageAnimation.Loop extends Object
How many turns an animation makes, and which way.
  • Field Details

  • Method Details

    • times

      public static ImageAnimation.Loop times(int turns)
      Parameters:
      turns - how many turns, above 0
      Returns:
      that many turns, ending on the last frame
      Throws:
      IllegalArgumentException - if turns is not above 0
    • turns

      public int turns()
      Returns:
      how many turns: above 0 for a count, 0 for without end, and -1 for FILE, whose count is the image's own
    • bounces

      public boolean bounces()
      Returns:
      whether it plays forward and then back: BOUNCE
    • equals

      public boolean equals(@Nullable Object other)
      Two loops are equal when they make the same turns the same way.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the loop as it is written: Loop.FILE, Loop.times(3)