Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1Geometry::Widen methods

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink.

Overload list

MethodDescription
Widen(FLOAT,ID2D1StrokeStyle*,D2D1_MATRIX_3X2_F*,ID2D1SimplifiedGeometrySink*)

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the default tolerance.

Widen(FLOAT,ID2D1StrokeStyle*,D2D1_MATRIX_3X2_F&,ID2D1SimplifiedGeometrySink*)

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the default tolerance.

Widen(FLOAT,ID2D1StrokeStyle*,D2D1_MATRIX_3X2_F*,FLOAT,ID2D1SimplifiedGeometrySink*)

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.

Widen(FLOAT,ID2D1StrokeStyle*,D2D1_MATRIX_3X2_F&,FLOAT,ID2D1SimplifiedGeometrySink*)

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.

Examples

The following code example shows how to use Widen to widen the geometry by the specified stroke and then write the result to an ID2D1SimplifiedGeometrySink object.


 ID2D1GeometrySink *pGeometrySink = NULL;
 hr = pPathGeometry->Open(&pGeometrySink);
 if (SUCCEEDED(hr))
 {
     hr = pGeometry->Widen(
             strokeWidth,
             pIStrokeStyle,
             pWorldTransform,
             pGeometrySink
             );

     if (SUCCEEDED(hr))
     {
         hr = pGeometrySink->Close();
         if (SUCCEEDED(hr))
         {
             ID2D1Mesh *pMesh = NULL;
             hr = m_pRT->CreateMesh(&pMesh);
             if (SUCCEEDED(hr))
             {
                 ID2D1TessellationSink *pSink = NULL;
                 hr = pMesh->Open(&pSink);
                 if (SUCCEEDED(hr))
                 {
                     hr = pPathGeometry->Tessellate(
                             NULL, // world transform (already handled in Widen)
                             pSink
                             );
                     if (SUCCEEDED(hr))
                     {
                         hr = pSink->Close();
                         if (SUCCEEDED(hr))
                         {
                             SafeReplace(&m_pStrokeMesh, pMesh);
                         }
                     }
                     pSink->Release();
                 }
                 pMesh->Release();
             }
         }
     }
     pGeometrySink->Release();
 }
 pPathGeometry->Release();


Requirements

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1Geometry

 

 

Show:
© 2017 Microsoft