ImageAttributes.GetAdjustedPalette(ColorPalette, ColorAdjustType) 方法

定義

根據指定分類的調整設定來調整調色盤中的色彩。Adjusts the colors in a palette according to the adjustment settings of a specified category.

public:
 void GetAdjustedPalette(System::Drawing::Imaging::ColorPalette ^ palette, System::Drawing::Imaging::ColorAdjustType type);
public void GetAdjustedPalette (System.Drawing.Imaging.ColorPalette palette, System.Drawing.Imaging.ColorAdjustType type);
member this.GetAdjustedPalette : System.Drawing.Imaging.ColorPalette * System.Drawing.Imaging.ColorAdjustType -> unit
Public Sub GetAdjustedPalette (palette As ColorPalette, type As ColorAdjustType)

參數

palette
ColorPalette

ColorPalette,其在輸入時會包含要調整的調色盤,而在輸出時會包含調整過的調色盤。A ColorPalette that on input contains the palette to be adjusted, and on output contains the adjusted palette.

type
ColorAdjustType

ColorAdjustType 的元素,指定其調整設定將套用至調色盤的分類。An element of ColorAdjustType that specifies the category whose adjustment settings will be applied to the palette.

備註

ImageAttributes 物件會維護五個調整分類的色彩和灰階設定:預設、點陣圖、筆刷、畫筆和文字。An ImageAttributes object maintains color and grayscale settings for five adjustment categories: default, bitmap, brush, pen, and text. 例如,您可以為預設分類指定色彩重新對應表、點陣圖類別的不同色彩重新對應表,以及畫筆類別目錄的不同色彩重新對應表。For example, you can specify a color-remap table for the default category, a different color-remap table for the bitmap category, and still a different color-remap table for the pen category.

當您呼叫 GetAdjustedPalette 方法時,您可以指定用來調整調色板色彩的調整分類。When you call the GetAdjustedPalette method, you can specify the adjustment category that is used to adjust the palette colors. 例如,如果您將 Bitmap 傳遞至 GetAdjustedPalette 方法,點陣圖類別目錄的調整設定就會用來調整調色板色彩。For example, if you pass Bitmap to the GetAdjustedPalette method, the adjustment settings of the bitmap category are used to adjust the palette colors.

適用於