GifGraphicsControlBlock

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

public class GifGraphicsControlBlock extends GifBlock

Gif 图形控制块.

构造函数

构造函数描述
GifGraphicsControlBlock()初始化 GifGraphicsControlBlock 类的新实例。
GifGraphicsControlBlock(byte flags, int delayTime, byte transparentColorIndex)初始化 GifGraphicsControlBlock 类的新实例。
GifGraphicsControlBlock(int delayTime, boolean hasTransparentColor, byte transparentColorIndex, boolean requiresUserInput, int disposalMethod)初始化 GifGraphicsControlBlock 类的新实例。

字段

字段描述
BLOCK_HEADER_SIZE指定块头大小。
EXTENSION_LABEL扩展标签。
SUB_BLOCK_SIZE获取子块大小。

方法

方法描述
getDelayTime()获取或设置以 1/100 秒表示的帧延迟时间。
setDelayTime(int value)获取或设置以 1/100 秒表示的帧延迟时间。
getFlags()获取或设置标志。
setFlags(byte value)获取或设置标志。
getTransparentColorIndex()获取或设置透明颜色索引。
setTransparentColorIndex(byte value)获取或设置透明颜色索引。
getDisposalMethod()获取或设置处理方式。
setDisposalMethod(int value)获取或设置处理方式。
getUserInputExpected()获取或设置指示是否期望用户输入的值。
setUserInputExpected(boolean value)获取或设置指示是否期望用户输入的值。
hasTransparentColor()获取或设置指示图形控制块是否具有透明颜色的值。
setTransparentColor(boolean value)获取或设置指示图形控制块是否具有透明颜色的值。
createFlags(boolean hasTransparentColor, boolean requiresUserInput, int disposalMethod)创建标志。

GifGraphicsControlBlock()

public GifGraphicsControlBlock()

初始化 GifGraphicsControlBlock 类的新实例。

GifGraphicsControlBlock(byte flags, int delayTime, byte transparentColorIndex)

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

初始化 GifGraphicsControlBlock 类的新实例。

Parameters:

参数类型描述
标志byte标志。
delayTimeint以 1/100 秒表示的延迟时间。
transparentColorIndexbyte透明颜色索引。

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

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

初始化 GifGraphicsControlBlock 类的新实例。

Parameters:

参数类型描述
delayTimeint以 1/100 秒表示的延迟时间。
hasTransparentColorboolean如果设置为 true,则 transparentColorIndex 有效。
transparentColorIndexbyte透明颜色索引。
requiresUserInputboolean如果设置为 true,则期望用户输入。
disposalMethodint释放方法。

BLOCK_HEADER_SIZE

public static final int BLOCK_HEADER_SIZE

指定块头大小。

EXTENSION_LABEL

public static final byte EXTENSION_LABEL

扩展标签。

SUB_BLOCK_SIZE

public static final byte SUB_BLOCK_SIZE

获取子块大小。

getDelayTime()

public int getDelayTime()

获取或设置以 1/100 秒表示的帧延迟时间。

Returns: int

setDelayTime(int value)

public void setDelayTime(int value)

获取或设置以 1/100 秒表示的帧延迟时间。

Parameters:

参数类型描述
valueint

getFlags()

public byte getFlags()

获取或设置标志。

值:标志。

Returns: byte

setFlags(byte value)

public void setFlags(byte value)

获取或设置标志。

值:标志。

Parameters:

参数类型描述
valuebyte

getTransparentColorIndex()

public byte getTransparentColorIndex()

获取或设置透明颜色索引。

值:透明颜色索引。

Returns: byte

setTransparentColorIndex(byte value)

public void setTransparentColorIndex(byte value)

获取或设置透明颜色索引。

值:透明颜色索引。

Parameters:

参数类型描述
valuebyte

getDisposalMethod()

public int getDisposalMethod()

获取或设置处理方式。

值:释放方法。

Returns: int

setDisposalMethod(int value)

public void setDisposalMethod(int value)

获取或设置处理方式。

值:释放方法。

Parameters:

参数类型描述
valueint

getUserInputExpected()

public boolean getUserInputExpected()

获取或设置指示是否期望用户输入的值。

值:如果期望用户输入则为 true;否则为 false

Returns: boolean

setUserInputExpected(boolean value)

public void setUserInputExpected(boolean value)

获取或设置指示是否期望用户输入的值。

值:如果期望用户输入则为 true;否则为 false

Parameters:

参数类型描述
valueboolean

hasTransparentColor()

public boolean hasTransparentColor()

获取或设置指示图形控制块是否具有透明颜色的值。

值:如果图形控制块具有透明颜色则为 true;否则为 false

Returns: boolean

setTransparentColor(boolean value)

public void setTransparentColor(boolean value)

获取或设置指示图形控制块是否具有透明颜色的值。

值:如果图形控制块具有透明颜色则为 true;否则为 false

Parameters:

参数类型描述
valueboolean

createFlags(boolean hasTransparentColor, boolean requiresUserInput, int disposalMethod)

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

创建标志。

Parameters:

参数类型描述
hasTransparentColorboolean如果设置为 true,则 GifGraphicsControlBlock 具有有效的透明颜色索引。
requiresUserInputboolean如果设置为 true,则期望用户输入。
disposalMethodint释放方法。

Returns: byte - 生成的标志。