Interface SimplifiedGeometrySink
[Guid("2cd9069e-12e2-11dc-9fed-001143a055f9")]
public interface SimplifiedGeometrySink : IUnknown, ICallbackable, IDisposable
- Inherited Members
Methods
AddBeziers(BezierSegment[])
Creates a sequence of cubic Bezier curves and adds them to the geometry sink.
void AddBeziers(BezierSegment[] beziers)
Parameters
beziers
BezierSegment[]A pointer to 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.
AddLines(RawVector2[])
Creates a sequence of lines using the specified points and adds them to the geometry sink.
void AddLines(RawVector2[] ointsRef)
Parameters
ointsRef
RawVector2[]A pointer to 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.
BeginFigure(RawVector2, FigureBegin)
Starts a new figure at the specified point.
void BeginFigure(RawVector2 startPoint, FigureBegin figureBegin)
Parameters
startPoint
RawVector2The point at which to begin the new figure.
figureBegin
FigureBeginWhether the new figure should be hollow or filled.
Remarks
If this method is called while a figure is currently in progress, the interface is invalidated and all future methods will fail.
Close()
Closes the geometry sink, indicates whether it is in an error state, and resets the sink's error state.
void Close()
Remarks
Do not close the geometry sink while a figure is still in progress; doing so puts the geometry sink in an error state. For the close operation to be successful, there must be one {{EndFigure}} call for each call to {{BeginFigure}}.After calling this method, the geometry sink might not be usable. Direct2D implementations of this interface do not allow the geometry sink to be modified after it is closed, but other implementations might not impose this restriction.
EndFigure(FigureEnd)
Ends the current figure; optionally, closes it.
void EndFigure(FigureEnd figureEnd)
Parameters
figureEnd
FigureEndA 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}}.
Remarks
Calling this method without a matching call to {{BeginFigure}} places the geometry sink in an error state; subsequent calls are ignored, and the overall failure will be returned when the {{Close}} method is called.
SetFillMode(FillMode)
Specifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside.
void SetFillMode(FillMode fillMode)
Parameters
fillMode
FillModeThe method used to determine whether a given point is part of the geometry.
Remarks
The fill mode defaults to D2D1_FILL_MODE_ALTERNATE. To set the fill mode, call SetFillMode before the first call to {{BeginFigure}}. Not doing will put the geometry sink in an error state.
SetSegmentFlags(PathSegment)
Specifies stroke and join options to be applied to new segments added to the geometry sink.
void SetSegmentFlags(PathSegment vertexFlags)
Parameters
vertexFlags
PathSegmentStroke and join options to be applied to new segments added to the geometry sink.
Remarks
After this method is called, the specified segment flags are applied to each segment subsequently added to the sink. The segment flags are applied to every additional segment until this method is called again and a different set of segment flags is specified.