Class PixbufSimpleAnim

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class PixbufSimpleAnim extends PixbufAnimation
An opaque struct representing a simple animation.
  • Constructor Details

    • PixbufSimpleAnim

      public PixbufSimpleAnim(MemorySegment address)
      Create a PixbufSimpleAnim instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • PixbufSimpleAnim

      @Deprecated public PixbufSimpleAnim(int width, int height, float rate)
      Deprecated.
      Use a different image loading library for animatable assets
      Creates a new, empty animation.
      Parameters:
      width - the width of the animation
      height - the height of the animation
      rate - the speed of the animation, in frames per second
      Since:
      2.8
    • PixbufSimpleAnim

      public PixbufSimpleAnim()
      Create a new PixbufSimpleAnim.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the PixbufSimpleAnim class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected PixbufSimpleAnim asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class PixbufAnimation
      Returns:
      the instance as if it were its parent type
    • addFrame

      @Deprecated public void addFrame(Pixbuf pixbuf)
      Deprecated.
      Use a different image loading library for animatable assets
      Adds a new frame to animation. The pixbuf must have the dimensions specified when the animation was constructed.
      Parameters:
      pixbuf - the pixbuf to add
      Since:
      2.8
    • getLoop

      @Deprecated public boolean getLoop()
      Deprecated.
      Use a different image loading library for animatable assets
      Gets whether this PixbufSimpleAnim should loop indefinitely when it reaches the end.
      Returns:
      true if the animation loops forever, false otherwise
      Since:
      2.18
    • setLoop

      @Deprecated public void setLoop(boolean loop)
      Deprecated.
      Use a different image loading library for animatable assets
      Sets whether this PixbufSimpleAnim should loop indefinitely when it reaches the end.
      Parameters:
      loop - whether to loop the animation
      Since:
      2.18
    • builder

      public static PixbufSimpleAnim.Builder<? extends PixbufSimpleAnim.Builder> builder()
      A PixbufSimpleAnim.Builder object constructs a PixbufSimpleAnim with the specified properties. Use the various set...() methods to set properties, and finish construction with PixbufSimpleAnim.Builder.build().
      Returns:
      the builder object