ColorMap 類別

定義

定義轉換色彩的對應。Defines a map for converting colors. ImageAttributes 類別的數個方法會藉由使用色彩重新對應表 (這是 ColorMap 結構的陣列) 來調整影像色彩。Several methods of the ImageAttributes class adjust image colors by using a color-remap table, which is an array of ColorMap structures. 無法被繼承。Not inheritable.

public ref class ColorMap sealed
public sealed class ColorMap
type ColorMap = class
Public NotInheritable Class ColorMap
繼承
ColorMap

備註

這個類別會定義現有色彩與要轉換的新色彩之間的對應。This class defines a mapping between existing colors and the new colors to which they are to be converted. 套用對應時,會將舊色彩的任何圖元轉換成新的色彩。When the map is applied, any pixel of the old color is converted to the new color.

建構函式

ColorMap()

初始化 ColorMap 類別的新執行個體。Initializes a new instance of the ColorMap class.

屬性

NewColor

取得或設定要轉換成的新 Color 結構。Gets or sets the new Color structure to which to convert.

OldColor

取得或設定要轉換的現有 Color 結構。Gets or sets the existing Color structure to be converted.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於