ImageAttributes.SetColorMatrices 方法

定义

设置颜色调整矩阵和灰度调整矩阵。

重载

名称 说明
SetColorMatrices(ColorMatrix, ColorMatrix)

设置默认类别的颜色调整矩阵和灰度调整矩阵。

SetColorMatrices(ColorMatrix, ColorMatrix, ColorMatrixFlag)

设置默认类别的颜色调整矩阵和灰度调整矩阵。

SetColorMatrices(ColorMatrix, ColorMatrix, ColorMatrixFlag, ColorAdjustType)

设置指定类别的颜色调整矩阵和灰度调整矩阵。

SetColorMatrices(ColorMatrix, ColorMatrix)

Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs

设置默认类别的颜色调整矩阵和灰度调整矩阵。

public:
 void SetColorMatrices(System::Drawing::Imaging::ColorMatrix ^ newColorMatrix, System::Drawing::Imaging::ColorMatrix ^ grayMatrix);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix? grayMatrix);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix grayMatrix);
member this.SetColorMatrices : System.Drawing.Imaging.ColorMatrix * System.Drawing.Imaging.ColorMatrix -> unit
Public Sub SetColorMatrices (newColorMatrix As ColorMatrix, grayMatrix As ColorMatrix)

参数

newColorMatrix
ColorMatrix

颜色调整矩阵。

grayMatrix
ColorMatrix

灰度调整矩阵。

注解

对象维护五个 ImageAttributes 调整类别的颜色和灰度设置:默认、位图、画笔、笔和文本。 例如,可以为默认类别指定调整矩阵、位图类别的不同调整矩阵,以及笔类别的调整矩阵。

默认颜色调整和灰度调整设置适用于没有自己调整设置的所有类别。 例如,如果从未为笔类别指定任何调整设置,则默认设置将应用于笔类别。

调用该方法 ImageAttributes.SetColorMatrices(ColorMatrix, ColorMatrix) 等效于调用 ImageAttributes.SetColorMatrices(ColorMatrix, ColorMatrix, ColorMatrixFlag) 该方法并传递 ColorMatrixFlag.Default 参数 flagsColorMatrixFlag.Default 指定所有颜色(包括灰色)均由颜色调整矩阵调整,而不是灰度调整矩阵。 因此,传递给此方法的灰度调整矩阵不起作用。

适用于

SetColorMatrices(ColorMatrix, ColorMatrix, ColorMatrixFlag)

Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs

设置默认类别的颜色调整矩阵和灰度调整矩阵。

public:
 void SetColorMatrices(System::Drawing::Imaging::ColorMatrix ^ newColorMatrix, System::Drawing::Imaging::ColorMatrix ^ grayMatrix, System::Drawing::Imaging::ColorMatrixFlag flags);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix? grayMatrix, System.Drawing.Imaging.ColorMatrixFlag flags);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix grayMatrix, System.Drawing.Imaging.ColorMatrixFlag flags);
member this.SetColorMatrices : System.Drawing.Imaging.ColorMatrix * System.Drawing.Imaging.ColorMatrix * System.Drawing.Imaging.ColorMatrixFlag -> unit
Public Sub SetColorMatrices (newColorMatrix As ColorMatrix, grayMatrix As ColorMatrix, flags As ColorMatrixFlag)

参数

newColorMatrix
ColorMatrix

颜色调整矩阵。

grayMatrix
ColorMatrix

灰度调整矩阵。

flags
ColorMatrixFlag

该元素 ColorMatrixFlag 指定受颜色调整和灰度调整矩阵影响的图像和颜色的类型。

注解

对象维护五个 ImageAttributes 调整类别的颜色和灰度设置:默认、位图、画笔、笔和文本。 例如,可以为默认类别指定调整矩阵、位图类别的不同调整矩阵,以及笔类别的调整矩阵。

默认颜色调整和灰度调整设置适用于没有自己调整设置的所有类别。 例如,如果从未为笔类别指定任何调整设置,则默认设置将应用于笔类别。

适用于

SetColorMatrices(ColorMatrix, ColorMatrix, ColorMatrixFlag, ColorAdjustType)

Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs

设置指定类别的颜色调整矩阵和灰度调整矩阵。

public:
 void SetColorMatrices(System::Drawing::Imaging::ColorMatrix ^ newColorMatrix, System::Drawing::Imaging::ColorMatrix ^ grayMatrix, System::Drawing::Imaging::ColorMatrixFlag mode, System::Drawing::Imaging::ColorAdjustType type);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix? grayMatrix, System.Drawing.Imaging.ColorMatrixFlag mode, System.Drawing.Imaging.ColorAdjustType type);
public void SetColorMatrices(System.Drawing.Imaging.ColorMatrix newColorMatrix, System.Drawing.Imaging.ColorMatrix grayMatrix, System.Drawing.Imaging.ColorMatrixFlag mode, System.Drawing.Imaging.ColorAdjustType type);
member this.SetColorMatrices : System.Drawing.Imaging.ColorMatrix * System.Drawing.Imaging.ColorMatrix * System.Drawing.Imaging.ColorMatrixFlag * System.Drawing.Imaging.ColorAdjustType -> unit
Public Sub SetColorMatrices (newColorMatrix As ColorMatrix, grayMatrix As ColorMatrix, mode As ColorMatrixFlag, type As ColorAdjustType)

参数

newColorMatrix
ColorMatrix

颜色调整矩阵。

grayMatrix
ColorMatrix

灰度调整矩阵。

mode
ColorMatrixFlag

该元素 ColorMatrixFlag 指定受颜色调整和灰度调整矩阵影响的图像和颜色的类型。

type
ColorAdjustType

一个元素 ColorAdjustType ,指定为其设置颜色调整和灰度调整矩阵的类别。

注解

对象维护五个 ImageAttributes 调整类别的颜色和灰度设置:默认、位图、画笔、笔和文本。 例如,可以为默认类别指定调整矩阵、位图类别的不同调整矩阵,以及笔类别的调整矩阵。

默认颜色调整和灰度调整设置适用于没有自己调整设置的所有类别。 例如,如果从未为笔类别指定任何调整设置,则默认设置将应用于笔类别。

指定特定类别的颜色调整或灰度调整设置后,默认调整设置将不再应用于该类别。 例如,假设为默认类别指定调整设置的集合。 如果通过传递给PenSetColorMatrices方法设置笔类别的颜色调整和灰度调整矩阵,则默认调整设置将不适用于笔。

适用于