GifPlainTextRenderingBlock
Inheritance: java.lang.Object, com.aspose.imaging.fileformats.gif.GifBlock
public class GifPlainTextRenderingBlock extends GifBlock
Gif 纯文本扩展块。纯文本扩展包含文本数据以及渲染该数据为图形所需的参数,采用简易形式。
构造函数
| 构造函数 | 描述 |
|---|---|
| GifPlainTextRenderingBlock() | 初始化 GifPlainTextRenderingBlock 类的新实例。 |
| GifPlainTextRenderingBlock(int textGridLeftPosition, int textGridTopPosition, int textGridWidth, int textGridHeight, byte characterCellWidth, byte characterCellHeight, byte textForegroundColorIndex, byte textBackgroundColorIndex, byte[] data) | 初始化 GifPlainTextRenderingBlock 类的新实例。 |
字段
| 字段 | 描述 |
|---|---|
| EXTENSION_LABEL | 纯文本扩展标签。 |
| SUB_BLOCK_SIZE | 子块的大小。 |
| BLOCK_SIZE | 整体块大小。 |
方法
| 方法 | 描述 |
|---|---|
| getTextForegroundColorIndex() | 获取或设置用于绘制文本前景的全局颜色调色板中颜色的索引。 |
| setTextForegroundColorIndex(byte value) | 获取或设置用于绘制文本前景的全局颜色调色板中颜色的索引。 |
| getTextBackgroundColorIndex() | 获取或设置用于绘制文本背景的全局颜色调色板中颜色的索引。 |
| setTextBackgroundColorIndex(byte value) | 获取或设置用于绘制文本背景的全局颜色调色板中颜色的索引。 |
| getCharacterCellWidth() | 获取或设置网格中每个单元格的字符单元宽度(像素)。 |
| setCharacterCellWidth(byte value) | 获取或设置网格中每个单元格的字符单元宽度(像素)。 |
| getCharacterCellHeight() | 获取或设置网格中每个单元格的字符单元高度(像素)。 |
| setCharacterCellHeight(byte value) | 获取或设置网格中每个单元格的字符单元高度(像素)。 |
| getTextGridLeftPosition() | 获取或设置文本网格的左侧位置。 |
| setTextGridLeftPosition(int value) | 获取或设置文本网格的左侧位置。 |
| getTextGridTopPosition() | 获取或设置文本网格的顶部位置。 |
| setTextGridTopPosition(int value) | 获取或设置文本网格的顶部位置。 |
| getTextGridWidth() | 获取或设置文本网格的宽度(像素) |
| setTextGridWidth(int value) | 获取或设置文本网格的宽度(像素) |
| getTextGridHeight() | 获取或设置文本网格的高度(像素)。 |
| setTextGridHeight(int value) | 获取或设置文本网格的高度(像素)。 |
| getPlainTextData() | 获取或设置纯文本数据。 |
| setPlainTextData(byte[] value) | 获取或设置纯文本数据。 |
GifPlainTextRenderingBlock()
public GifPlainTextRenderingBlock()
初始化 GifPlainTextRenderingBlock 类的新实例。
GifPlainTextRenderingBlock(int textGridLeftPosition, int textGridTopPosition, int textGridWidth, int textGridHeight, byte characterCellWidth, byte characterCellHeight, byte textForegroundColorIndex, byte textBackgroundColorIndex, byte[] data)
public GifPlainTextRenderingBlock(int textGridLeftPosition, int textGridTopPosition, int textGridWidth, int textGridHeight, byte characterCellWidth, byte characterCellHeight, byte textForegroundColorIndex, byte textBackgroundColorIndex, byte[] data)
初始化 GifPlainTextRenderingBlock 类的新实例。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| textGridLeftPosition | int | 文本网格左侧位置。 |
| textGridTopPosition | int | 文本网格顶部位置。 |
| textGridWidth | int | 文本网格宽度。 |
| textGridHeight | int | 文本网格高度。 |
| characterCellWidth | byte | 字符单元宽度。 |
| characterCellHeight | byte | 字符单元高度。 |
| textForegroundColorIndex | byte | 前景颜色索引。 |
| textBackgroundColorIndex | byte | 背景颜色索引。 |
| 数据 | byte[] | 纯文本数据。 |
EXTENSION_LABEL
public static final byte EXTENSION_LABEL
纯文本扩展标签。
SUB_BLOCK_SIZE
public static final byte SUB_BLOCK_SIZE
子块的大小。
BLOCK_SIZE
public static final byte BLOCK_SIZE
整体块大小。
getTextForegroundColorIndex()
public byte getTextForegroundColorIndex()
获取或设置用于绘制文本前景的全局颜色调色板中颜色的索引。
值:前景颜色索引。
Returns: byte
setTextForegroundColorIndex(byte value)
public void setTextForegroundColorIndex(byte value)
获取或设置用于绘制文本前景的全局颜色调色板中颜色的索引。
值:前景颜色索引。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | byte |
getTextBackgroundColorIndex()
public byte getTextBackgroundColorIndex()
获取或设置用于绘制文本背景的全局颜色调色板中颜色的索引。
值:背景颜色索引。
Returns: byte
setTextBackgroundColorIndex(byte value)
public void setTextBackgroundColorIndex(byte value)
获取或设置用于绘制文本背景的全局颜色调色板中颜色的索引。
值:背景颜色索引。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | byte |
getCharacterCellWidth()
public byte getCharacterCellWidth()
获取或设置网格中每个单元格的字符单元宽度(像素)。
值:字符单元格宽度。
Returns: byte
setCharacterCellWidth(byte value)
public void setCharacterCellWidth(byte value)
获取或设置网格中每个单元格的字符单元宽度(像素)。
值:字符单元格宽度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | byte |
getCharacterCellHeight()
public byte getCharacterCellHeight()
获取或设置网格中每个单元格的字符单元高度(像素)。
值:字符单元格高度。
Returns: byte
setCharacterCellHeight(byte value)
public void setCharacterCellHeight(byte value)
获取或设置网格中每个单元格的字符单元高度(像素)。
值:字符单元格高度。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | byte |
getTextGridLeftPosition()
public int getTextGridLeftPosition()
获取或设置文本网格的左侧位置。
值:文本网格左侧位置。
这是文本网格左边缘相对于逻辑屏幕左边缘的列号(以像素为单位)。
Returns: int
setTextGridLeftPosition(int value)
public void setTextGridLeftPosition(int value)
获取或设置文本网格的左侧位置。
值:文本网格左侧位置。
这是文本网格左边缘相对于逻辑屏幕左边缘的列号(以像素为单位)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | int |
getTextGridTopPosition()
public int getTextGridTopPosition()
获取或设置文本网格的顶部位置。
值:文本网格顶部位置。
这是文本网格顶部相对于逻辑屏幕顶部的行号(以像素为单位)。
Returns: int
setTextGridTopPosition(int value)
public void setTextGridTopPosition(int value)
获取或设置文本网格的顶部位置。
值:文本网格顶部位置。
这是文本网格顶部相对于逻辑屏幕顶部的行号(以像素为单位)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | int |
getTextGridWidth()
public int getTextGridWidth()
获取或设置文本网格的宽度(像素)
值:文本网格宽度(像素)。
Returns: int
setTextGridWidth(int value)
public void setTextGridWidth(int value)
获取或设置文本网格的宽度(像素)
值:文本网格宽度(像素)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | int |
getTextGridHeight()
public int getTextGridHeight()
获取或设置文本网格的高度(像素)。
值:文本网格高度(像素)。
Returns: int
setTextGridHeight(int value)
public void setTextGridHeight(int value)
获取或设置文本网格的高度(像素)。
值:文本网格高度(像素)。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | int |
getPlainTextData()
public byte[] getPlainTextData()
获取或设置纯文本数据。
值:纯文本数据。
Returns: byte[]
setPlainTextData(byte[] value)
public void setPlainTextData(byte[] value)
获取或设置纯文本数据。
值:纯文本数据。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| value | byte[] |