Class DrawableOp

  • All Implemented Interfaces:

    
    public abstract class DrawableOp
    
                        

    Class to represent an operation that can be applied on a component that modifies it in some way.

    It is applied before and after rendering, for example a Move, Resize, or Rotate operation, or a transition.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class DrawableOp.Move

      Note: if you are making a UI, you should probably be using scale, rotate, or translate instead of this class.

      public abstract class DrawableOp.Persistent

      Abstract class representing a persistent drawable operation.

      A persistent operation is one that remains active indefinitely and does not finish.

      These are special as they are not taken into account during removal of a drawable.

      public final class DrawableOp.Fade
      public final class DrawableOp.Rotate

      Note: if you are making a UI, you should probably be using scale, rotate, or translate instead of this class.

      public final class DrawableOp.Resize
      public final class DrawableOp.Scale
      public final class DrawableOp.Skew
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Animation getAnimation()
      Boolean isFinished()
      abstract Unit apply(Renderer renderer) apply this drawable operation.
      Unit unapply(Renderer renderer) de-apply this operation, if required.
      Unit update(Long deltaTimeNanos) update the underlying animation, if present.
      • Methods inherited from class java.lang.Object

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

      • DrawableOp

        DrawableOp(Drawable drawable)
    • Method Detail

      • apply

         abstract Unit apply(Renderer renderer)

        apply this drawable operation.

        the renderer is provided in case you want to do some transformations. A state will already be pushed for you.

        please note that this is NOT intended to be used directly for rendering of objects, and only for transformations.

      • update

         Unit update(Long deltaTimeNanos)

        update the underlying animation, if present.