ImageAttributes.ClearGamma 方法

定義

停用 Gamma 修正。Disables gamma correction.

多載

ClearGamma()

停用預設分類的 Gamma 修正。Disables gamma correction for the default category.

ClearGamma(ColorAdjustType)

停用指定分類的 Gamma 修正。Disables gamma correction for a specified category.

ClearGamma()

停用預設分類的 Gamma 修正。Disables gamma correction for the default category.

public:
 void ClearGamma();
public void ClearGamma ();
member this.ClearGamma : unit -> unit
Public Sub ClearGamma ()

備註

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

預設的彩色調整和灰階調整設定適用于沒有自己的調整設定的所有類別。The default color-adjustment and grayscale-adjustment settings apply to all categories that do not have adjustment settings of their own. 例如, 如果您從未針對 [畫筆] 分類指定任何調整設定, 則預設設定會套用至 [畫筆] 分類。For example, if you never specify any adjustment settings for the pen category, the default settings apply to the pen category.

ClearGamma(ColorAdjustType)

停用指定分類的 Gamma 修正。Disables gamma correction for a specified category.

public:
 void ClearGamma(System::Drawing::Imaging::ColorAdjustType type);
public void ClearGamma (System.Drawing.Imaging.ColorAdjustType type);
member this.ClearGamma : System.Drawing.Imaging.ColorAdjustType -> unit
Public Sub ClearGamma (type As ColorAdjustType)

參數

type
ColorAdjustType

ColorAdjustType 的元素,指定已停用 Gamma 修正的分類。An element of ColorAdjustType that specifies the category for which gamma correction is disabled.

備註

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

預設的彩色調整和灰階調整設定適用于沒有自己的調整設定的所有類別。The default color-adjustment and grayscale-adjustment settings apply to all categories that do not have adjustment settings of their own. 例如, 如果您從未針對 [畫筆] 分類指定任何調整設定, 則預設設定會套用至 [畫筆] 分類。For example, if you never specify any adjustment settings for the pen category, then the default settings apply to the pen category.

當您指定特定分類的彩色調整或灰階調整設定時, 預設調整設定就不再適用于該類別。As soon as you specify a color-adjustment or grayscale-adjustment setting for a certain category, the default adjustment settings no longer apply to that category. 例如, 假設您指定 gamma 值和預設分類的彩色調整矩陣。For example, suppose you specify a gamma value and a color-adjustment matrix for the default category. 如果您藉由呼叫SetGamma方法來設定 [畫筆] 分類的 gamma 值, 則預設 gamma 值將不會套用至畫筆。If you set the gamma value for the pen category by calling the SetGamma method, the default gamma value will not apply to pens. 如果您稍後藉由呼叫ClearGamma方法來清除畫筆 gamma 值, 則 [畫筆] 分類將不會還原為預設的 gamma 值; 而 [畫筆] 分類則不會有 gamma 值。If you later clear the pen gamma value by calling the ClearGamma method, the pen category will not revert to the default gamma value; rather, the pen category will have no gamma value. 同樣地, 畫筆類別目錄也不會還原成預設的彩色調整矩陣。相反地, [畫筆] 類別不會有彩色調整矩陣。Similarly, the pen category will not revert to the default color-adjustment matrix; rather, the pen category will have no color-adjustment matrix.

適用於