Packages

 

com.aspose.imaging.fileformats.gif.blocks

Class GifGraphicsControlBlock

  • All Implemented Interfaces:
    IGifBlock


    public class GifGraphicsControlBlock
    extends GifBlock

    Gif graphics control block.

    • Field Detail

      • BLOCK_HEADER_SIZE

        public static final int BLOCK_HEADER_SIZE

        Specifies the block header size.

        See Also:
        Constant Field Values
      • EXTENSION_LABEL

        public static final byte EXTENSION_LABEL

        Extension label.

        See Also:
        Constant Field Values
      • SUB_BLOCK_SIZE

        public static final byte SUB_BLOCK_SIZE

        Gets the sub-block size.

        See Also:
        Constant Field Values
    • Constructor Detail

      • GifGraphicsControlBlock

        public GifGraphicsControlBlock()

        Initializes a new instance of the GifGraphicsControlBlock class.

      • GifGraphicsControlBlock

        public GifGraphicsControlBlock(byte flags,
                                       int delayTime,
                                       byte transparentColorIndex)

        Initializes a new instance of the GifGraphicsControlBlock class.

        Parameters:
        flags - The flags.
        delayTime - The delay time expressed in 1/100 seconds.
        transparentColorIndex - The transparent color index.
      • GifGraphicsControlBlock

        public GifGraphicsControlBlock(int delayTime,
                                       boolean hasTransparentColor,
                                       byte transparentColorIndex,
                                       boolean requiresUserInput,
                                       int disposalMethod)

        Initializes a new instance of the GifGraphicsControlBlock class.

        Parameters:
        delayTime - The delay time expressed in 1/100 seconds.
        hasTransparentColor - if set to true the transparentColorIndex is valid.
        transparentColorIndex - The transparent color index.
        requiresUserInput - if set to true the user input is expected.
        disposalMethod - The disposal method.
    • Method Detail

      • getDelayTime

        public int getDelayTime()

        Gets or sets the frame delay time expressed in 1/100 seconds.

      • setDelayTime

        public void setDelayTime(int value)

        Gets or sets the frame delay time expressed in 1/100 seconds.

      • getFlags

        public byte getFlags()

        Gets or sets the flags.

        Value: The flags.
      • setFlags

        public void setFlags(byte value)

        Gets or sets the flags.

        Value: The flags.
      • getTransparentColorIndex

        public byte getTransparentColorIndex()

        Gets or sets the transparent color index.

        Value: The transparent color index.
      • setTransparentColorIndex

        public void setTransparentColorIndex(byte value)

        Gets or sets the transparent color index.

        Value: The transparent color index.
      • getDisposalMethod

        public int getDisposalMethod()

        Gets or sets the disposal method.

        Value: The disposal method.
      • setDisposalMethod

        public void setDisposalMethod(int value)

        Gets or sets the disposal method.

        Value: The disposal method.
      • getUserInputExpected

        public boolean getUserInputExpected()

        Gets or sets a value indicating whether user input is expected.

        Value: true if user input is expected; otherwise, false.
      • setUserInputExpected

        public void setUserInputExpected(boolean value)

        Gets or sets a value indicating whether user input is expected.

        Value: true if user input is expected; otherwise, false.
      • hasTransparentColor

        public boolean hasTransparentColor()

        Gets or sets a value indicating whether graphics control block has transparent color.

        Value: true if graphics control block has transparent color; otherwise, false.
      • setTransparentColor

        public void setTransparentColor(boolean value)

        Gets or sets a value indicating whether graphics control block has transparent color.

        Value: true if graphics control block has transparent color; otherwise, false.
      • createFlags

        public static byte createFlags(boolean hasTransparentColor,
                                       boolean requiresUserInput,
                                       int disposalMethod)

        Creates the flags.

        Parameters:
        hasTransparentColor - if set to true the GifGraphicsControlBlock has valid transparent color index.
        requiresUserInput - if set to true the user input is expected.
        disposalMethod - The disposal method.
        Returns:
        The generated flags.