CD2DPathGeometry Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CD2DPathGeometry Class.
A wrapper for ID2D1PathGeometry.
class CD2DPathGeometry : public CD2DGeometry;
Name | Description |
---|---|
CD2DPathGeometry::CD2DPathGeometry | Constructs a CD2DPathGeometry object. |
Name | Description |
---|---|
CD2DPathGeometry::Attach | Attaches existing resource interface to the object |
CD2DPathGeometry::Create | Creates a CD2DPathGeometry. (Overrides CD2DResource::Create.) |
CD2DPathGeometry::Destroy | Destroys a CD2DPathGeometry object. (Overrides CD2DGeometry::Destroy.) |
CD2DPathGeometry::Detach | Detaches resource interface from the object |
CD2DPathGeometry::GetFigureCount | Retrieves tthe number of figures in the path geometry. |
CD2DPathGeometry::GetSegmentCount | Retrieves the number of segments in the path geometry. |
CD2DPathGeometry::Open | Retrieves the geometry sink that is used to populate the path geometry with figures and segments. |
CD2DPathGeometry::Stream | Copies the contents of the path geometry to the specified ID2D1GeometrySink. |
Name | Description |
---|---|
CD2DPathGeometry::m_pPathGeometry | A pointer to an ID2D1PathGeometry. |
Header: afxrendertarget.h
Attaches existing resource interface to the object
void Attach(ID2D1PathGeometry* pResource);
pResource
Existing resource interface. Cannot be NULL
Constructs a CD2DPathGeometry object.
CD2DPathGeometry(
CRenderTarget* pParentTarget,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).
Creates a CD2DPathGeometry.
virtual HRESULT Create(CRenderTarget* pRenderTarget);
pRenderTarget
A pointer to the render target.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Destroys a CD2DPathGeometry object.
virtual void Destroy();
Detaches resource interface from the object
ID2D1PathGeometry* Detach();
Pointer to detached resource interface.
Retrieves tthe number of figures in the path geometry.
int GetFigureCount() const;
Returns the number of figures in the path geometry.
Retrieves the number of segments in the path geometry.
int GetSegmentCount() const;
Returns the number of segments in the path geometry.
A pointer to an ID2D1PathGeometry.
ID2D1PathGeometry* m_pPathGeometry;
Retrieves the geometry sink that is used to populate the path geometry with figures and segments.
ID2D1GeometrySink* Open();
A pointer to the ID2D1GeometrySink that is used to populate the path geometry with figures and segments.
Copies the contents of the path geometry to the specified ID2D1GeometrySink.
BOOL Stream(ID2D1GeometrySink* geometrySink);
geometrySink
The sink to which the path geometry's contents are copied. Modifying this sink does not change the contents of this path geometry.
If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.