ImageAttributes 函数
Windows GDI+ 公开一个由大约 600 个函数组成的平面 API,这些函数在 Gdiplus.dll 中实现并在 Gdiplusflat.h 中声明。 GDI+ 平面 API 中的函数由大约 40 个 C++ 类的集合包装。 建议不要直接调用平面 API 中的函数。 每当调用 GDI+ 时,都应该通过调用 C++ 包装器提供的方法和函数来执行此操作。 Microsoft 产品支持服务不会为直接调用平面 API 的代码提供支持。 有关使用这些包装器方法的详细信息,请参阅 GDI+ 平面 API。
以下平面 API 函数由 ImageAttributes C++ 类包装。
ImageAttributes 函数和相应的包装器方法
平面函数 | 包装器方法 | 备注 |
---|---|---|
GpStatus WINGDIPAPI GdipCreateImageAttributes (GpImageAttributes **imageattr) |
ImageAttributes::ImageAttributes () | 创建 ImageAttributes 对象。 |
GpStatus WINGDIPAPI GdipCloneImageAttributes (GDIPCONST GpImageAttributes *imageattr, GpImageAttributes **cloneImageattr) |
ImageAttributes* ImageAttributes::Clone () const | 创建此 ImageAttributes 对象的副本。 |
GpStatus WINGDIPAPI GdipDisposeImageAttributes (GpImageAttributes *imageattr) |
ImageAttributes::~ImageAttributes () | 释放 ImageAttributes 对象使用的资源。 |
GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity (GpImageAttributes *imageattr, ColorAdjustType 类型) |
Status ImageAttributes::SetToIdentity ( IN ColorAdjustType 类型 = ColorAdjustTypeDefault ) | 将指定类别的颜色调整矩阵设置为标识矩阵。 |
GpStatus WINGDIPAPI GdipResetImageAttributes (GpImageAttributes *imageattr, ColorAdjustType type) |
Status ImageAttributes::Reset ( IN ColorAdjustType type = ColorAdjustTypeDefault ) | 将指定类别的颜色调整矩阵设置为标识矩阵。 |
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix, GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags 标志) |
Status ImageAttributes::SetColorMatrix ( IN const ColorMatrix *colorMatrix, IN ColorMatrixFlags mode = ColorMatrixFlagsDefault, IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearColorMatrix (IN ColorAdjustType type = ColorAdjustTypeDefault) | 为指定类别设置颜色调整矩阵。 平面函数中的 enableFlag 参数是一个布尔值,该值指定是否为 类型 参数指定的类别启用单独的颜色调整。 ImageAttributes::SetColorMatrix 将 enableFlag 设置为 TRUE, ImageAttributes::ClearColorMatrix 将 enableFlag 设置为 FALSE。 清除指定类别的颜色调整矩阵。 grayMatrix 参数指定当 flags 参数的值为 ColorMatrixFlagsAltGray 时用于调整灰色阴影的矩阵。 |
GpStatus WINGDIPAPI GdipSetImageAttributesThreshold (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL threshold) |
Status ImageAttributes::SetThreshold ( IN REAL threshold, IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearThreshold (IN ColorAdjustType 类型 = ColorAdjustTypeDefault) |
为指定类别设置阈值(透明范围)。 平面函数中的 enableFlag 参数是一个布尔值,指定是否为 类型 参数指定的类别启用单独的阈值。 ImageAttributes::SetThreshold 将 enableFlag 设置为 TRUE, ImageAttributes::ClearThreshold 将 enableFlag 设置为 FALSE。清除指定类别的阈值。 |
GpStatus WINGDIPAPI GdipSetImageAttributesGamma (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL gamma) |
Status ImageAttributes::SetGamma (IN REAL gamma, IN ColorAdjustType type = ColorAdjustTypeDefault) Status ImageAttributes::ClearGamma (IN ColorAdjustType 类型 = ColorAdjustTypeDefault) |
为指定类别设置伽玛值。 平面函数中的 enableFlag 参数是一个布尔值,指定是否为 类型 参数指定的类别启用单独的伽玛。 ImageAttributes::SetGamma 将 enableFlag 设置为 TRUE, ImageAttributes::ClearGamma 将 enableFlag 设置为 FALSE。 为指定类别禁用灰度校正。 |
GpStatus WINGDIPAPI GdipSetImageAttributesNoOp (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag) |
Status ImageAttributes::SetNoOp ( IN ColorAdjustType 类型 = ColorAdjustTypeDefault ) Status ImageAttributes::ClearNoOp (IN ColorAdjustType 类型 = ColorAdjustTypeDefault) |
为指定类别关闭颜色调整。 可以调用 ImageAttributes::ClearNoOp 方法,以恢复在调用 ImageAttributes::SetNoOp 方法之前已设置的颜色调整设置。 平面函数中的 enableFlag 参数是一个布尔值,指定是否为 类型 参数指定的类别启用颜色调整。 ImageAttributes::SetNoOp 将 enableFlag 设置为 TRUE, ImageAttributes::ClearNoOp 将 enableFlag 设置为 FALSE。 清除指定类别的 NoOp 设置。 |
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh) |
Status ImageAttributes::SetColorKey ( IN const ColorLow& ,IN const Color& colorHigh,IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearColorKey (IN ColorAdjustType 类型 = ColorAdjustTypeDefault) |
为指定类别设置颜色键(透明范围)。 平面函数中的 enableFlag 参数是一个布尔值,指定是否为 类型 参数指定的类别启用单独的透明度范围。 ImageAttributes::SetColorKey 将 enableFlag 设置为 TRUE, ImageAttributes::ClearColorKey 将 enableFlag 设置为 FALSE。 为指定类别清除颜色键(透明范围)。 |
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags) |
Status ImageAttributes::SetOutputChannel ( IN ColorChannelFlags channelFlags, IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearOutputChannel (IN ColorAdjustType type = ColorAdjustTypeDefault) |
为指定类别设置青色-品红色-黄色-黑色 (CMYK) 输出通道。 平面函数中的 enableFlag 参数是一个布尔值,该值指定是否为 类型 参数指定的类别启用单独的输出通道。 ImageAttributes::SetOutputChannel 将 enableFlag 设置为 TRUE, ImageAttributes::ClearOutputChannel 将 enableFlag 设置为 FALSE。 清除指定类别的青色-品红色-黄色-黑色 (CMYK) 输出通道设置。 |
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST WCHAR *colorProfileFilename) |
Status ImageAttributes::SetOutputChannelColorProfile ( IN const WCHAR *colorProfileFilename, IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearOutputChannelColorProfile (IN ColorAdjustType 类型 = ColorAdjustTypeDefault) |
为指定类别设置输出通道颜色配置文件。 平面函数中的 enableFlag 参数是一个布尔值,该值指定是否为 type 参数指定的类别启用单独的输出通道颜色配置文件。 ImageAttributes::SetOutputChannelColorProfile 将 enableFlag 设置为 TRUE, ImageAttributes::ClearOutputChannelColorProfile 将 enableFlag 设置为 FALSE。 为指定类别清除输出通道颜色配置文件设置。 |
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable (GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map) |
Status ImageAttributes::SetRemapTable ( IN UINT mapSize, IN const ColorMap *map, IN ColorAdjustType type = ColorAdjustTypeDefault ) Status ImageAttributes::ClearRemapTable (IN ColorAdjustType type = ColorAdjustTypeDefault) |
为指定类别设置颜色重新映射表。 平面函数中的 enableFlag 参数是一个布尔值,指定是否为 type 参数指定的类别启用单独的颜色重映射表。 ImageAttributes::SetRemapTable 将 enableFlag 设置为 TRUE, ImageAttributes::ClearRemapTable 将 enableFlag 设置为 FALSE。 为指定类别清除颜色重新映射表。 |
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode (GpImageAttributes *imageAttr,WrapMode wrap,ARGB argb argb,BOOL clamp ) |
Status ImageAttributes::SetWrapMode (IN WrapMode wrap, IN const Color& color = Color () , IN BOOL clamp = FALSE) |
设置此 ImageAttributes 对象的换行模式 |
GpStatus WINGDIPAPI GdipSetImageAttributesICMMode (GpImageAttributes *imageAttr, BOOL on ) |
不由包装器方法调用。 |
此函数将内部状态变量设置为 由 on 参数指定的值。 如果此值为 TRUE,则图像颜色管理 (ICM) 用于所有颜色调整。 如果值为 FALSE,则不使用 ICM。 |
GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette (GpImageAttributes *imageAttr, ColorPalette * colorPalette, ColorAdjustType colorAdjustType ) |
Status ImageAttributes::GetAdjustedPalette (IN OUT ColorPalette* colorPalette, IN ColorAdjustType colorAdjustType) const |
根据指定类别的调整设置,调整调色板中的颜色。 |
GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground (GpImageAttributes *imageattr, BOOL enableFlag) |
不由包装器方法调用。 |
设置或清除指定 GpImageAttributes 对象的 CachedBackground 成员。 GDI+ 不使用 CachedBackground 成员,因此调用此函数不起作用。 imageattr 参数指定 GpImageAttributes 对象。 enableFlag 参数指定是 (TRUE) 设置 CachedBackground 成员,还是 (FALSE) 清除成员。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈