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.