IVsGradient::GetGradientVector Method (Int32, array<UInt32>^)
Returns an array of colors used to create a brush for a given gradient.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Parameters
- cVector
-
Type:
System::Int32
[in] Size of the rgVector array to be returned.
- rgVector
-
Type:
array<System::UInt32>^
[out] An array of cVector RGB values that define a gradient.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell80.idl:
HRESULT IVsGradient::GetGradientVector( [in] int cVector, [in,out, size_is(cVector)] COLORREF* rgVector );
When using this method, the specified value of cVector should be the number of pixels to be painted in the direction of the gradient on to a UI element.
Each of the RGB values in the rgVector array are 32-bit Windows color values in the format of a COLOREF.
C++ code can make direct use of the returned RGB value by using the macros that support COLOREFs, such as GetRValue, GetGValue and GetBValue.
Managed code that uses returned colors can use a System.Drawing.Color structure, which can be obtained from the 32-bit Windows color value by using System.Drawing.ColorTranslator.FromWin32.