Class ColorPalette
ชื่อพื้นที่: Aspose.Imaging การประกอบ: Aspose.Imaging.dll (25.4.0)
กําหนดชุดของสีที่ประกอบด้วยแพลตฟอร์มสี สีเป็นสี ARGB 32 บิต ไม่เป็นพันธุกรรม
[JsonObject(MemberSerialization.OptIn)]
public sealed class ColorPalette : IColorPalette
Inheritance
Implements
อนุญาโตตุลาการ
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
ColorPalette(int[ ], บอล)
เริ่มต้นตัวอย่างใหม่ของคลาส Aspose.Imaging.ColorPalette
[JsonConstructor]
public ColorPalette(int[] argb32Entries, bool isCompactPalette)
Parameters
argb32Entries
int
[ ]
แผ่นสี 32 บิต ARGB entries
isCompactPalette
bool
แสดงให้เห็นว่ามันจะกะทัดรัดแผง
ColorPalette(int[])
เริ่มต้นตัวอย่างใหม่ของคลาส Aspose.Imaging.ColorPalette และ IsCompactPalette เป็นข้อผิดพลาด
public ColorPalette(int[] argb32Entries)
Parameters
argb32Entries
int
[ ]
แผ่นสี 32 บิต ARGB entries
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; }
คุณสมบัติมูลค่า
IsCompactPalette
รับหรือตั้งค่าหมายความว่าแพลตฟอร์มขนาดกะทัดรัดจะใช้หรือไม่
public bool IsCompactPalette { get; }
คุณสมบัติมูลค่า
Remarks
แพลิเคชันขนาดกะทัดรัดหมายความว่าภาพจะประกอบด้วยรายการแพลิเคชันที่ระบุเท่านั้นหากเป็นไปได้หรือด้วยคําอื่นภาพจะมีความกะทัดรัดมากขึ้นและใช้พื้นที่น้อยลงในทางอื่น ๆ จะมี 2^bitPerPixel entries และภาพจะจัดเก็บพื้นที่มากขึ้นสําหรับรายการแพลตฟอร์มทั้งหมดที่เป็นไปได้การตั้งค่าค่านี้เป็นจริงและเปลี่ยนรายการแพลตฟอร์มอาจทําให้เกิดการลงโทษการทํางานเนื่องจากการเคลื่อนไหวของข้อมูลอาจเกิดขึ้นเพื่อให้ใช้มันอย่างระมัดระวัง
Methods
CopyPalette(IColorPalette, บอล)
คัดลอกพลาสติก
public static ColorPalette CopyPalette(IColorPalette colorPalette, bool useCompactPalette)
Parameters
colorPalette
IColorPalette
แผ่นสี
useCompactPalette
bool
แสดงให้เห็นว่าพลาสติกกะทัดรัดหรือไม่
Returns
แพลิเคชันที่สร้างขึ้นใหม่และคัดลอกหรือ null ถ้า null แพลิเคชันผ่านไป
CopyPalette(คอลัมน์)
คัดลอกพลาสติก
public static ColorPalette CopyPalette(IColorPalette colorPalette)
Parameters
colorPalette
IColorPalette
แผ่นสี
Returns
แพลิเคชันที่สร้างขึ้นใหม่และคัดลอกหรือ null ถ้า null แพลิเคชันผ่านไป
GetArgb32Color(int)
ได้รับสีแพลตฟอร์ม 32 บิต ARGB โดย indexes
public int GetArgb32Color(int index)
Parameters
index
int
32 บิต ARGB แพลิเคชัน Color Index
Returns
แปลงสีที่ระบุโดย index".
Exceptions
ถ้าแพลตฟอร์มสี index" ที่ระบุไว้จะออกจากช่วงรายการแพลตฟอร์ม
GetColor(int)
รับสีแพลตฟอร์มโดย index
public Color GetColor(int index)
Parameters
index
int
ดัชนีสี Palette
Returns
แปลงสีที่ระบุโดย index".
Exceptions
ถ้าแพลตฟอร์มสี index" ที่ระบุไว้จะออกจากช่วงรายการแพลตฟอร์ม
GetNearestColorIndex(int)
รับดัชนีของสีที่ใกล้ที่สุด
public int GetNearestColorIndex(int argb32Color)
Parameters
argb32Color
int
สี ARGB 32 บิต
Returns
ดัชนีของสีใกล้ที่สุด
GetNearestColorIndex(Color)
รับดัชนีของสีที่ใกล้ที่สุด
public int GetNearestColorIndex(Color color)
Parameters
color
Color
สี
Returns
ดัชนีของสีใกล้ที่สุด