다음을 통해 공유


IVsGradient.GetGradientVector(Int32, UInt32[]) Method

Definition

Returns an array of colors used to create a brush for a given gradient.

public:
 int GetGradientVector(int cVector, cli::array <System::UInt32> ^ rgVector);
public:
 int GetGradientVector(int cVector, Platform::Array <unsigned int> ^ rgVector);
int GetGradientVector(int cVector, std::Array <unsigned int> const & rgVector);
public int GetGradientVector (int cVector, uint[] rgVector);
abstract member GetGradientVector : int * uint32[] -> int
Public Function GetGradientVector (cVector As Integer, rgVector As UInteger()) As Integer

Parameters

cVector
Int32

[in] Size of the rgVector array to be returned.

rgVector
UInt32[]

[out] An array of cVector RGB values that define a gradient.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

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.

Applies to