Notă
Accesul la această pagină necesită autorizare. Puteți încerca să vă conectați sau să modificați directoarele.
Accesul la această pagină necesită autorizare. Puteți încerca să modificați directoarele.
Rotates and optionally scales an image.
The CLSID for this effect is CLSID_D2D1Straighten.
Example image

Sample code
ComPtr<ID2D1Effect> straightenEffect;
m_d2dContext->CreateEffect(CLSID_D2D1Straighten, &straightenEffect);
straightenEffect->SetInput(0, bitmap);
straightenEffect->SetValue(D2D1_STRAIGHTEN_PROP_ANGLE, 12.0f);
straightenEffect->SetValue(D2D1_STRAIGHTEN_PROP_MAINTAIN_SIZE, true);
straightenEffect->SetValue(D2D1_STRAIGHTEN_PROP_SCALE_MODE, D2D1_STRAIGHTEN_SCALE_MODE_LINEAR);
m_d2dContext->BeginDraw();
m_d2dContext->DrawImage(straightenEffect.Get());
m_d2dContext->EndDraw();
Effect properties
The properties for the straighten effect are defined by the D2D1_STRAIGHTEN_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 |