类 ColorPalette
ColorPalette class
定义组成调色板的颜色数组。这些颜色为 32 位 ARGB 颜色。不可继承。
public sealed class ColorPalette : IColorPalette
构造函数
| 名称 | 描述 |
|---|---|
| ColorPalette(Color[]) | 初始化 ColorPalette 类的新实例,且 IsCompactPalette 为 false。 |
| ColorPalette(int[]) | 初始化 ColorPalette 类的新实例,且 IsCompactPalette 为 false。 |
| ColorPalette(Color[], bool) | 初始化 ColorPalette 类的新实例。 |
| ColorPalette(int[], bool) | 初始化 ColorPalette 类的新实例。 |
属性
| 名称 | 描述 |
|---|---|
| Argb32Entries { get; } | 获取 32 位 ARGB 结构的数组。 |
| Entries { get; } | 获取 Color 结构的数组。 |
| EntriesCount { get; } | 获取条目计数。 |
| IsCompactPalette { get; } | 获取或设置一个值,指示是否使用紧凑调色板。 |
方法
| 名称 | 描述 |
|---|---|
| static CopyPalette(IColorPalette) | 复制调色板。 |
| static CopyPalette(IColorPalette, bool) | 复制调色板。 |
| GetArgb32Color(int) | 按索引获取 32 位 ARGB 调色板颜色。 |
| GetColor(int) | 通过索引获取调色板颜色。 |
| GetNearestColorIndex(Color) | 获取最近颜色的索引。 |
| GetNearestColorIndex(int) | 获取最近颜色的索引。 |
另请参见
- interface IColorPalette
- namespace Aspose.Imaging
- assembly Aspose.Imaging