IColorPalette 类
内容
[
隐藏
]Summary: The color palette interface.
Module: aspose.imaging
Full Name: aspose.imaging.IColorPalette
Properties
| Name | Type | Access | 描述 |
|---|---|---|---|
| argb_32_entries | int[] | r | 获取 32 位 ARGB 结构的数组。 |
| entries | Color[] | r | 获取 Color 结构的数组。 |
| entries_count | int | r | 获取条目计数。 |
| is_compact_palette | bool | r | 获取一个值,指示是否使用紧凑调色板。 |
Methods
| Name | 描述 |
|---|---|
| get_argb_32_color(index) | 按索引获取 32 位 ARGB 调色板颜色。 |
| get_color(index) | 按索引获取调色板颜色。 |
| get_nearest_color_index(argb_32_color) | 获取最近的 32 位 ARGB 颜色的索引。 |
| get_nearest_color_index(color) | 获取最近的 32 位 ARGB 颜色的索引。 |
Method: get_argb_32_color(index)
get_argb_32_color(index)
按索引获取 32 位 ARGB 调色板颜色。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| index | int | 32 位 ARGB 调色板颜色索引。 |
Returns
| Type | Description |
|---|---|
| int | 由 index 指定的颜色调色板条目。 |
Method: get_color(index)
get_color(index)
按索引获取调色板颜色。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| index | int | 调色板颜色索引。 |
Returns
| Type | Description |
|---|---|
| Color | 由 index 指定的颜色调色板条目。 |
Method: get_nearest_color_index(argb_32_color)
get_nearest_color_index(argb_32_color)
获取最近的 32 位 ARGB 颜色的索引。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| argb_32_color | int | 32 位 ARGB 颜色。 |
Returns
| Type | Description |
|---|---|
| int | 最近颜色的索引。 |
Method: get_nearest_color_index(color)
get_nearest_color_index(color)
获取最近的 32 位 ARGB 颜色的索引。
Parameters:
| 参数 | Type | Description |
|---|---|---|
| color | Color |
Returns
| Type | Description |
|---|---|
| int | 最近颜色的索引。 |