Class ColorPalette

Class ColorPalette

名称: Aspose.Imaging 收藏: Aspose.Imaging.dll (25.4.0)

定义一系列构成色彩板的颜色. 颜色是 32 位 ARGB 颜色. 不继承。

[JsonObject(MemberSerialization.OptIn)]
public sealed class ColorPalette : IColorPalette

Inheritance

object ColorPalette

Implements

IColorPalette

继承人

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

ColorPalette(因特( ), 博尔)

启动了 Aspose.Imaging.ColorPalette 类的新例子。

[JsonConstructor]
public ColorPalette(int[] argb32Entries, bool isCompactPalette)

Parameters

argb32Entries int ( )

32 位 ARGB 色彩插入。

isCompactPalette bool

指示它是否紧凑的板块。

ColorPalette(因特[])

启动一个新的例子 Aspose.Imaging.ColorPalette 类和 IsCompactPalette 是假的。

public ColorPalette(int[] argb32Entries)

Parameters

argb32Entries int ( )

32 位 ARGB 色彩插入。

ColorPalette(Color( ), 博尔)

启动了 Aspose.Imaging.ColorPalette 类的新例子。

public ColorPalette(Color[] entries, bool isCompactPalette)

Parameters

entries Color ( )

彩色插入。

isCompactPalette bool

指示它是否紧凑的板块。

ColorPalette(Color[])

启动一个新的例子 Aspose.Imaging.ColorPalette 类和 IsCompactPalette 是假的。

public ColorPalette(Color[] entries)

Parameters

entries Color ( )

彩色插入。

Properties

Argb32Entries

接收一系列 32 位 ARGB 结构。

public int[] Argb32Entries { get; }

财产价值

int ( )

Entries

得到一系列的 Aspose.Imaging.Color 结构。

public Color[] Entries { get; }

财产价值

Color ( )

EntriesCount

收到入口数。

public int EntriesCount { get; }

财产价值

int

IsCompactPalette

收到或设置一个值,表明是否使用了小型板块。

public bool IsCompactPalette { get; }

财产价值

bool

Remarks

压缩板意味着图像将仅包含所指定的插件,如果可能的话,或者换句话说图像将更加压缩,占据更少的空间;否则将有 2^BitsPerPixel 输入,图像将为所有可能的插件提供更多的空间。将此值定为真实的,并改变插件可能会导致性能罚款,因为数据流动可能会发生,所以仔细使用它。

Methods

CopyPalette(彩色 彩色 彩色)

复制 Palette。

public static ColorPalette CopyPalette(IColorPalette colorPalette, bool useCompactPalette)

Parameters

colorPalette IColorPalette

颜色板。

useCompactPalette bool

指示是否是微型板块。

Returns

ColorPalette

新创建和复制的板块或零,如果零板块过去了。

CopyPalette(色彩色彩)

复制 Palette。

public static ColorPalette CopyPalette(IColorPalette colorPalette)

Parameters

colorPalette IColorPalette

颜色板。

Returns

ColorPalette

新创建和复制的板块或零,如果零板块过去了。

GetArgb32Color(因特)

根据索引获得 32 位 ARGB 彩色。

public int GetArgb32Color(int index)

Parameters

index int

32 位 ARGB 色彩指数。

Returns

int

颜色板输入由 index" 指定。

Exceptions

ArgumentOutOfRangeException

如果指定的颜色板 index’ 出于板输入范围。

GetColor(因特)

按指数获取彩色。

public Color GetColor(int index)

Parameters

index int

彩色指数 彩色指数

Returns

Color

颜色板输入由 index" 指定。

Exceptions

ArgumentOutOfRangeException

如果指定的颜色板 index’ 出于板输入范围。

GetNearestColorIndex(因特)

接近最接近的颜色的指数。

public int GetNearestColorIndex(int argb32Color)

Parameters

argb32Color int

32 位 ARGB 色彩

Returns

int

最接近的颜色的指数。

GetNearestColorIndex(Color)

接近最接近的颜色的指数。

public int GetNearestColorIndex(Color color)

Parameters

color Color

颜色。

Returns

int

最接近的颜色的指数。

 中文