description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CD2DGeometrySink Class |
CD2DGeometrySink Class |
11/04/2016 |
|
|
e5e07f41-0343-4ab1-9d6b-8c62ed33c04a |
A wrapper for ID2D1GeometrySink.
class CD2DGeometrySink;
Name | Description |
---|---|
CD2DGeometrySink::CD2DGeometrySink | Constructs a CD2DGeometrySink object from CD2DPathGeometry object. |
CD2DGeometrySink::~CD2DGeometrySink | The destructor. Called when a D2D geometry sink object is being destroyed. |
Name | Description |
---|---|
CD2DGeometrySink::AddArc | Adds a single arc to the path geometry |
CD2DGeometrySink::AddBezier | Creates a cubic Bezier curve between the current point and the specified end point. |
CD2DGeometrySink::AddBeziers | Creates a sequence of cubic Bezier curves and adds them to the geometry sink. |
CD2DGeometrySink::AddLine | Creates a line segment between the current point and the specified end point and adds it to the geometry sink. |
CD2DGeometrySink::AddLines | Creates a sequence of lines using the specified points and adds them to the geometry sink. |
CD2DGeometrySink::AddQuadraticBezier | Creates a quadratic Bezier curve between the current point and the specified end point. |
CD2DGeometrySink::AddQuadraticBeziers | Adds a sequence of quadratic Bezier segments as an array in a single call. |
CD2DGeometrySink::BeginFigure | Starts a new figure at the specified point. |
CD2DGeometrySink::Close | Closes the geometry sink |
CD2DGeometrySink::EndFigure | Ends the current figure; optionally, closes it. |
CD2DGeometrySink::Get | Returns ID2D1GeometrySink interface |
CD2DGeometrySink::IsValid | Checks geometry sink validity |
CD2DGeometrySink::SetFillMode | Specifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside. |
CD2DGeometrySink::SetSegmentFlags | Specifies stroke and join options to be applied to new segments added to the geometry sink. |
Name | Description |
---|---|
CD2DGeometrySink::operator ID2D1GeometrySink* | Returns ID2D1GeometrySink interface |
Name | Description |
---|---|
CD2DGeometrySink::m_pSink | A 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);
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);
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);
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);
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);
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);
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);
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);
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);
pathGeometry
An existing CD2DPathGeometry object.
Closes the geometry sink
BOOL Close();
Nonzero if successful; otherwise FALSE.
Ends the current figure; optionally, closes it.
void EndFigure(D2D1_FIGURE_END figureEnd);
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();
Pointer to an ID2D1GeometrySink interface or NULL if object is not initialized yet.
Checks geometry sink validity
BOOL IsValid() const;
TRUE if geometry sink is valid; otherwise FALSE.
A pointer to an ID2D1GeometrySink.
ID2D1GeometrySink* m_pSink;
Returns ID2D1GeometrySink interface
operator ID2D1GeometrySink*();
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);
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);
vertexFlags
Stroke and join options to be applied to new segments added to the geometry sink.