GifGraphicsControlBlock

Inheritance: java.lang.Object, com.aspose.imaging.fileformats.gif.GifBlock

public class GifGraphicsControlBlock extends GifBlock

Gif graphics control block.

Constructors

ConstructorDescription
GifGraphicsControlBlock()Initializes a new instance of the GifGraphicsControlBlock class.
GifGraphicsControlBlock(byte flags, int delayTime, byte transparentColorIndex)Initializes a new instance of the GifGraphicsControlBlock class.
GifGraphicsControlBlock(int delayTime, boolean hasTransparentColor, byte transparentColorIndex, boolean requiresUserInput, int disposalMethod)Initializes a new instance of the GifGraphicsControlBlock class.

Fields

FieldDescription
BLOCK_HEADER_SIZESpecifies the block header size.
EXTENSION_LABELExtension label.
SUB_BLOCK_SIZEGets the sub-block size.

Methods

MethodDescription
getDelayTime()Gets or sets the frame delay time expressed in 1/100 seconds.
setDelayTime(int value)Gets or sets the frame delay time expressed in 1/100 seconds.
getFlags()Gets or sets the flags.
setFlags(byte value)Gets or sets the flags.
getTransparentColorIndex()Gets or sets the transparent color index.
setTransparentColorIndex(byte value)Gets or sets the transparent color index.
getDisposalMethod()Gets or sets the disposal method.
setDisposalMethod(int value)Gets or sets the disposal method.
getUserInputExpected()Gets or sets a value indicating whether user input is expected.
setUserInputExpected(boolean value)Gets or sets a value indicating whether user input is expected.
hasTransparentColor()Gets or sets a value indicating whether graphics control block has transparent color.
setTransparentColor(boolean value)Gets or sets a value indicating whether graphics control block has transparent color.
createFlags(boolean hasTransparentColor, boolean requiresUserInput, int disposalMethod)Creates the flags.

GifGraphicsControlBlock()

public GifGraphicsControlBlock()

Initializes a new instance of the GifGraphicsControlBlock class.

GifGraphicsControlBlock(byte flags, int delayTime, byte transparentColorIndex)

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

Initializes a new instance of the GifGraphicsControlBlock class.

Parameters:

ParameterTypeDescription
flagsbyteThe flags.
delayTimeintThe delay time expressed in 1/100 seconds.
transparentColorIndexbyteThe transparent color index.

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

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

Initializes a new instance of the GifGraphicsControlBlock class.

Parameters:

ParameterTypeDescription
delayTimeintThe delay time expressed in 1/100 seconds.
hasTransparentColorbooleanif set to true the transparentColorIndex is valid.
transparentColorIndexbyteThe transparent color index.
requiresUserInputbooleanif set to true the user input is expected.
disposalMethodintThe disposal method.

BLOCK_HEADER_SIZE

public static final int BLOCK_HEADER_SIZE

Specifies the block header size.

EXTENSION_LABEL

public static final byte EXTENSION_LABEL

Extension label.

SUB_BLOCK_SIZE

public static final byte SUB_BLOCK_SIZE

Gets the sub-block size.

getDelayTime()

public int getDelayTime()

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

Returns: int

setDelayTime(int value)

public void setDelayTime(int value)

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

Parameters:

ParameterTypeDescription
valueint

getFlags()

public byte getFlags()

Gets or sets the flags.

Value: The flags.

Returns: byte

setFlags(byte value)

public void setFlags(byte value)

Gets or sets the flags.

Value: The flags.

Parameters:

ParameterTypeDescription
valuebyte

getTransparentColorIndex()

public byte getTransparentColorIndex()

Gets or sets the transparent color index.

Value: The transparent color index.

Returns: byte

setTransparentColorIndex(byte value)

public void setTransparentColorIndex(byte value)

Gets or sets the transparent color index.

Value: The transparent color index.

Parameters:

ParameterTypeDescription
valuebyte

getDisposalMethod()

public int getDisposalMethod()

Gets or sets the disposal method.

Value: The disposal method.

Returns: int

setDisposalMethod(int value)

public void setDisposalMethod(int value)

Gets or sets the disposal method.

Value: The disposal method.

Parameters:

ParameterTypeDescription
valueint

getUserInputExpected()

public boolean getUserInputExpected()

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

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

Returns: boolean

setUserInputExpected(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

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.

Returns: boolean

setTransparentColor(boolean value)

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.

Parameters:

ParameterTypeDescription
valueboolean

createFlags(boolean hasTransparentColor, boolean requiresUserInput, int disposalMethod)

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

Creates the flags.

Parameters:

ParameterTypeDescription
hasTransparentColorbooleanif set to true the GifGraphicsControlBlock has valid transparent color index.
requiresUserInputbooleanif set to true the user input is expected.
disposalMethodintThe disposal method.

Returns: byte - The generated flags.