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.

CD2DGeometrySink 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 CD2DGeometrySink Class.

A wrapper for ID2D1GeometrySink.

class CD2DGeometrySink;  

Public Constructors

NameDescription
CD2DGeometrySink::CD2DGeometrySinkConstructs a CD2DGeometrySink object from CD2DPathGeometry object.
CD2DGeometrySink::~CD2DGeometrySinkThe destructor. Called when a D2D geometry sink object is being destroyed.

Public Methods

NameDescription
CD2DGeometrySink::AddArcAdds a single arc to the path geometry
CD2DGeometrySink::AddBezierCreates a cubic Bezier curve between the current point and the specified end point.
CD2DGeometrySink::AddBeziersCreates a sequence of cubic Bezier curves and adds them to the geometry sink.
CD2DGeometrySink::AddLineCreates a line segment between the current point and the specified end point and adds it to the geometry sink.
CD2DGeometrySink::AddLinesCreates a sequence of lines using the specified points and adds them to the geometry sink.
CD2DGeometrySink::AddQuadraticBezierCreates a quadratic Bezier curve between the current point and the specified end point.
CD2DGeometrySink::AddQuadraticBeziersAdds a sequence of quadratic Bezier segments as an array in a single call.
CD2DGeometrySink::BeginFigureStarts a new figure at the specified point.
CD2DGeometrySink::CloseCloses the geometry sink
CD2DGeometrySink::EndFigureEnds the current figure; optionally, closes it.
CD2DGeometrySink::GetReturns ID2D1GeometrySink interface
CD2DGeometrySink::IsValidChecks geometry sink validity
CD2DGeometrySink::SetFillModeSpecifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside.
CD2DGeometrySink::SetSegmentFlagsSpecifies stroke and join options to be applied to new segments added to the geometry sink.

Public Operators

NameDescription
CD2DGeometrySink::operator ID2D1GeometrySink*Returns ID2D1GeometrySink interface

Protected Data Members

NameDescription
CD2DGeometrySink::m_pSinkA pointer to an ID2D1GeometrySink.

CD2DGeometrySink

Header: afxrendertarget.h

The destructor. Called when a D2D geometry sink object is being destroyed.

virtual ~CD2DGeometrySink();

Adds a single arc to the path geometry

void AddArc(const D2D1_ARC_SEGMENT& arc);

Parameters

arc
The arc segment to add to the figure

Creates a cubic Bezier curve between the current point and the specified end point.

void AddBezier(const D2D1_BEZIER_SEGMENT& bezier);

Parameters

bezier
A structure that describes the control points and end point of the Bezier curve to add.

Creates a sequence of cubic Bezier curves and adds them to the geometry sink.

void AddBeziers(
    const CArray<D2D1_BEZIER_SEGMENT,  
    D2D1_BEZIER_SEGMENT>& beziers);

Parameters

beziers
An array of Bezier segments that describes the Bezier curves to create. A curve is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by BeginFigure) to the end point of the first Bezier segment in the array. if the array contains additional Bezier segments, each subsequent Bezier segment uses the end point of the preceding Bezier segment as its start point.

Creates a line segment between the current point and the specified end point and adds it to the geometry sink.

void AddLine(CD2DPointF point);

Parameters

point
The end point of the line to draw.

Creates a sequence of lines using the specified points and adds them to the geometry sink.

void AddLines(
    const CArray<CD2DPointF,  
    CD2DPointF>& points);

Parameters

points
An array of one or more points that describe the lines to draw. A line is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by BeginFigure) to the first point in the array. if the array contains additional points, a line is drawn from the first point to the second point in the array, from the second point to the third point, and so on. An array of a sequence of the end points of the lines to draw.

Creates a quadratic Bezier curve between the current point and the specified end point.

void AddQuadraticBezier(const D2D1_QUADRATIC_BEZIER_SEGMENT& bezier);

Parameters

bezier
A structure that describes the control point and the end point of the quadratic Bezier curve to add.

Adds a sequence of quadratic Bezier segments as an array in a single call.

void AddQuadraticBeziers(
    const CArray<D2D1_QUADRATIC_BEZIER_SEGMENT,  
    D2D1_QUADRATIC_BEZIER_SEGMENT>& beziers);

Parameters

beziers
An array of a sequence of quadratic Bezier segments.

Starts a new figure at the specified point.

void BeginFigure(
    CD2DPointF startPoint,  
    D2D1_FIGURE_BEGIN figureBegin);

Parameters

startPoint
The point at which to begin the new figure.

figureBegin
Whether the new figure should be hollow or filled.

Constructs a CD2DGeometrySink object from CD2DPathGeometry object.

CD2DGeometrySink(CD2DPathGeometry& pathGeometry);

Parameters

pathGeometry
An existing CD2DPathGeometry object.

Closes the geometry sink

BOOL Close();

Return Value

Nonzero if successful; otherwise FALSE.

Ends the current figure; optionally, closes it.

void EndFigure(D2D1_FIGURE_END figureEnd);

Parameters

figureEnd
A value that indicates whether the current figure is closed. If the figure is closed, a line is drawn between the current point and the start point specified by BeginFigure.

Returns ID2D1GeometrySink interface

ID2D1GeometrySink* Get();

Return Value

Pointer to an ID2D1GeometrySink interface or NULL if object is not initialized yet.

Checks geometry sink validity

BOOL IsValid() const;  

Return Value

TRUE if geometry sink is valid; otherwise FALSE.

A pointer to an ID2D1GeometrySink.

ID2D1GeometrySink* m_pSink;  

Returns ID2D1GeometrySink interface

operator ID2D1GeometrySink*();

Return Value

Pointer to an ID2D1GeometrySink interface or NULL if object is not initialized yet.

Specifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside.

void SetFillMode(D2D1_FILL_MODE fillMode);

Parameters

fillMode
The method used to determine whether a given point is part of the geometry.

Specifies stroke and join options to be applied to new segments added to the geometry sink.

void SetSegmentFlags(D2D1_PATH_SEGMENT vertexFlags);

Parameters

vertexFlags
Stroke and join options to be applied to new segments added to the geometry sink.

Classes

Show: