Vignette effect
Fades the input image at the edges to a user-set color.
The CLSID for this effect is CLSID_D2D1Vignette.
Example image
Sample code
ComPtr<ID2D1Effect> vignetteEffect;
m_d2dContext->CreateEffect(CLSID_D2D1Vignette, &vignetteEffect);
vignetteEffect->SetInput(0, bitmap);
vignetteEffect->SetValue(D2D1_VIGNETTE_PROP_COLOR, );
vignetteEffect->SetValue(D2D1_VIGNETTE_PROP_TRANSITION_SIZE, 0.1f);
vignetteEffect->SetValue(D2D1_VIGNETTE_PROP_STRENGTH, 0.5f);
m_d2dContext->BeginDraw();
m_d2dContext->DrawImage(vignetteEffect.Get());
m_d2dContext->EndDraw();
Effect properties
The properties for the vignette effect are defined by the D2D1_VIGNETTE_PROP enumeration.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10 [desktop apps | Windows Store apps] |
Minimum supported server | Windows 10 [desktop apps | Windows Store apps] |
Header | d2d1effects_2.h |
Library | d2d1.lib, dxguid.lib |
Related topics
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