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 [ ]

إدخال لوحة الألوان ARGB 32 بت.

isCompactPalette bool

إظهار ما إذا كان صغيرًا أو صغيرًا.

ColorPalette(إنت[])

يبدأ مثال جديد من فئة Aspose.Imaging.ColorPalette و IsCompactPalette هو كاذب.

public ColorPalette(int[] argb32Entries)

Parameters

argb32Entries int [ ]

إدخال لوحة الألوان ARGB 32 بت.

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^bitPerPixel إدخالات والصورة سوف تحجز المزيد من المساحة لجميع إدخالات اللوحة الممكنة.إن وضع هذا القيمة في حقيقة وتغيير إدخالات اللوحة قد يؤدي إلى عقوبة الأداء لأن حركة البيانات قد تحدث لذلك استخدمها بعناية.

Methods

CopyPalette(اللوحة، بول)

نسخ اللوحة .

public static ColorPalette CopyPalette(IColorPalette colorPalette, bool useCompactPalette)

Parameters

colorPalette IColorPalette

اللوحة الألوان .

useCompactPalette bool

إشارة إلى ما إذا كانت اللوحة المدمجة.

Returns

ColorPalette

اللوحة التي تم إنشاؤها حديثًا أو نسخها أو صفر إذا مر اللوحة الصفرية.

CopyPalette(ICOLORPALET)

نسخ اللوحة .

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

مؤشر أقرب لون.

 عربي