返回使用的颜色创建特定渐变的画笔。
命名空间: Microsoft.VisualStudio.Shell.Interop
程序集: Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)
语法
声明
Function GetGradientVector ( _
cVector As Integer, _
<OutAttribute> rgVector As UInteger() _
) As Integer
int GetGradientVector(
int cVector,
uint[] rgVector
)
参数
- cVector
类型:System.Int32
[in] 要返回的 rgVector 数组的大小。
- rgVector
类型:array<System.UInt32[]
[out] cVector 定义一个渐变的 RGB 值。
返回值
类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。
备注
COM 签名
从 vsshell80.idl:
HRESULT IVsGradient::GetGradientVector(
[in] int cVector,
[in,out, size_is(cVector)] COLORREF* rgVector
);
在使用 this method, 时 cVector 的指定应是向渐变方向要绘制的像素的位数。 UI 元素。
每一个在 rgVector 数组的 RGB 值为 32 位 windows 颜色值。 COLOREF的格式。
C++ 代码可以执行直接使用返回的 RGB 值使用支持 COLOREF的,例如 GetRValue、 GetGValue 和 GetBValue的宏。
使用返回的颜色的托管代码可以使用 System.Drawing.Color 结构,使用 System.Drawing.ColorTranslator.FromWin32,可以从 32 位 windows 颜色获取的值。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。