com.aspose.imaging.fileformats.gif.blocks
Class GifGraphicsControlBlock

java.lang.Object
  extended by com.aspose.imaging.fileformats.gif.GifBlock
      extended by com.aspose.imaging.fileformats.gif.blocks.GifGraphicsControlBlock
All Implemented Interfaces:
IGifBlock

public class GifGraphicsControlBlock
extends GifBlock

Gif graphics control block.


Field Summary
static int BlockHeaderSize
           Specifies the block header size.
static byte ExtensionLabel
           Extension label.
static byte SubBlockSize
           Gets the sub-block size.
 
Fields inherited from class com.aspose.imaging.fileformats.gif.GifBlock
ExtensionIntroducer
 
Constructor Summary
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.
 
Method Summary
static byte createFlags(boolean hasTransparentColor, boolean requiresUserInput, int disposalMethod)
           Creates the flags.
 int getDelayTime()
           Gets or sets the frame delay time expressed in 1/100 seconds.
 int getDisposalMethod()
           Gets or sets the disposal method.
 byte getFlags()
           Gets or sets the flags.
 byte getTransparentColorIndex()
           Gets or sets the transparent color index.
 boolean getUserInputExpected()
           Gets or sets a value indicating whether user input is expected.
 boolean hasTransparentColor()
           Gets or sets a value indicating whether graphics control block has transparent color.
 void hasTransparentColor(boolean value)
           
 void save(java.io.InputStream stream)
           Saves the block to the specified InputStream.
 void saveInternal(Stream stream)
           Saves the block to the specified stream.
 void setDelayTime(int value)
           
 void setDisposalMethod(int value)
           
 void setFlags(byte value)
           
 void setTransparentColorIndex(byte value)
           
 void setUserInputExpected(boolean value)
           
 
Methods inherited from class com.aspose.imaging.fileformats.gif.GifBlock
isChanged, isChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BlockHeaderSize

public static final int BlockHeaderSize

Specifies the block header size.

See Also:
Constant Field Values

ExtensionLabel

public static final byte ExtensionLabel

Extension label.

See Also:
Constant Field Values

SubBlockSize

public static final byte SubBlockSize

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

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.

getDelayTime

public int getDelayTime()

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


getDisposalMethod

public int getDisposalMethod()

Gets or sets the disposal method.

Value: The disposal method.


getFlags

public byte getFlags()

Gets or sets the flags.

Value: The flags.


getTransparentColorIndex

public byte getTransparentColorIndex()

Gets or sets the transparent color index.

Value: The transparent color index.


getUserInputExpected

public boolean getUserInputExpected()

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.


hasTransparentColor

public void hasTransparentColor(boolean value)

save

public void save(java.io.InputStream stream)
Description copied from class: GifBlock

Saves the block to the specified InputStream.

Specified by:
save in interface IGifBlock
Overrides:
save in class GifBlock

saveInternal

public void saveInternal(Stream stream)

Saves the block to the specified stream.

Specified by:
saveInternal in interface IGifBlock
Specified by:
saveInternal in class GifBlock
Parameters:
stream - The stream to save data to.

setDelayTime

public void setDelayTime(int value)

setDisposalMethod

public void setDisposalMethod(int value)

setFlags

public void setFlags(byte value)

setTransparentColorIndex

public void setTransparentColorIndex(byte value)

setUserInputExpected

public void setUserInputExpected(boolean value)