Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes the red, green, blue, and alpha components of a color.
typedef D2D_COLOR_F D2D1_COLOR_F;
Remarks
D2D1_COLOR_F is a typedef for D2D_COLOR_F, which is itself a typedef for D3DCOLORVALUE. For information about the members provided by D2D1_COLOR_F, see D3DCOLORVALUE.
The ColorF class provides a set of predefined colors and helper functions for defining colors. For more information, see the ColorF reference.
Examples
The following example uses the ColorF class to specify a predefined color (black) when creating an ID2D1SolidColorBrush.
hr = m_pRenderTarget->CreateSolidColorBrush(
D2D1::ColorF(D2D1::ColorF::Black, 1.0f),
&m_pBlackBrush
);
The following example uses the ColorF class to specify a color using red, green, blue, and alpha values.
ID2D1SolidColorBrush *pGridBrush = NULL;
hr = pCompatibleRenderTarget->CreateSolidColorBrush(
D2D1::ColorF(D2D1::ColorF(0.93f, 0.94f, 0.96f, 1.0f)),
&pGridBrush
);
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Minimum supported phone |
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps] |
Header |
|