ID2D1SolidColorBrush::SetColor(constD2D1_COLOR_F&) method (d2d1.h)
Specifies the color of this solid-color brush.
Syntax
void SetColor(
[ref] const D2D1_COLOR_F & color
);
Parameters
[ref] color
Type: const D2D1_COLOR_F
The color of this solid-color brush.
Return value
None
Remarks
To help create colors, Direct2D provides the ColorF class. It offers several helper methods for creating colors and provides a set or predefined colors.
Examples
The following code shows how to use this method.
m_pSolidColorBrush->SetColor(
D2D1::ColorF(
0.0f,
intensity,
1.0f - intensity
));
hr = m_pRealization->Fill(
m_pRT,
m_pSolidColorBrush,
m_useRealizations ?
REALIZATION_RENDER_MODE_DEFAULT :
REALIZATION_RENDER_MODE_FORCE_UNREALIZED
);
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] |
Target Platform | Windows |
Header | d2d1.h |
Library | D2d1.lib |
DLL | D2d1.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for