Muokkaa

Jaa


CD2DPathGeometry Class

A wrapper for ID2D1PathGeometry.

Syntax

class CD2DPathGeometry : public CD2DGeometry;

Members

Public Constructors

Name Description
CD2DPathGeometry::CD2DPathGeometry Constructs a CD2DPathGeometry object.

Public Methods

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 the 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.

Protected Data Members

Name Description
CD2DPathGeometry::m_pPathGeometry A pointer to an ID2D1PathGeometry.

Inheritance Hierarchy

CObject

CD2DResource

CD2DGeometry

CD2DPathGeometry

Requirements

Header: afxrendertarget.h

CD2DPathGeometry::Attach

Attaches existing resource interface to the object

void Attach(ID2D1PathGeometry* pResource);

Parameters

pResource
Existing resource interface. Cannot be NULL

CD2DPathGeometry::CD2DPathGeometry

Constructs a CD2DPathGeometry object.

CD2DPathGeometry(
    CRenderTarget* pParentTarget,
    BOOL bAutoDestroy = TRUE);

Parameters

pParentTarget
A pointer to the render target.

bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).

CD2DPathGeometry::Create

Creates a CD2DPathGeometry.

virtual HRESULT Create(CRenderTarget* pRenderTarget);

Parameters

pRenderTarget
A pointer to the render target.

Return Value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

CD2DPathGeometry::Destroy

Destroys a CD2DPathGeometry object.

virtual void Destroy();

CD2DPathGeometry::Detach

Detaches resource interface from the object

ID2D1PathGeometry* Detach();

Return Value

Pointer to detached resource interface.

CD2DPathGeometry::GetFigureCount

Retrieves tthe number of figures in the path geometry.

int GetFigureCount() const;

Return Value

Returns the number of figures in the path geometry.

CD2DPathGeometry::GetSegmentCount

Retrieves the number of segments in the path geometry.

int GetSegmentCount() const;

Return Value

Returns the number of segments in the path geometry.

CD2DPathGeometry::m_pPathGeometry

A pointer to an ID2D1PathGeometry.

ID2D1PathGeometry* m_pPathGeometry;

CD2DPathGeometry::Open

Retrieves the geometry sink that is used to populate the path geometry with figures and segments.

ID2D1GeometrySink* Open();

Return Value

A pointer to the ID2D1GeometrySink 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.

BOOL Stream(ID2D1GeometrySink* geometrySink);

Parameters

geometrySink
The sink to which the path geometry's contents are copied. Modifying this sink does not change the contents of this path geometry.

Return Value

If the method succeeds, it returns TRUE. Otherwise, it returns FALSE.

See also

Classes