API Reference > geometry-core > ArraysAndInterfaces > IStrokeHandler IStrokeHandler Interface IStrokeHandler is an interface with methods to receive data about curves being stroked. CurvePrimitives emitStrokes () methods emit calls to a handler object with these methods. The various CurvePrimitive types are free to announce either single points (announcePoint), linear fragments, or fractional intervals of the parent curve. handler.startCurvePrimitive (cp) -- announce the curve primitive whose strokes will follow. announcePointTangent (xyz, fraction, tangent) -- announce a single point on the curve. announceIntervalForUniformStepStrokes (cp, numStrokes, fraction0, fraction1) -- announce a fraction interval in which the curve can be evaluated (e.g. the handler can call cp->fractionToPointAndDerivative ()) announceSegmentInterval (cp, point0, point1, numStrokes, fraction0, fraction1) -- announce that the fractional interval fraction0, fraction1 is a straight line which should be broken into numStrokes strokes. A LineSegment would make a single call to this. A LineString would make one call to this for each of its segments, with fractions indicating position within the linestring. endCurvePrimitive (cp) -- announce the end of the curve primitive. Methods Name Description announceBezierCurve(bezier: BezierCurveBase, numStrokes: number, parent: CurvePrimitive, spandex: number, fraction0: number, fraction1: number): void Optional Announce a bezier curve fragment. announceIntervalForUniformStepStrokes(cp: CurvePrimitive, numStrokes: number, fraction0: number, fraction1: number): void Announce that curve primitive cp should be evaluated in the specified fraction interval. announcePointTangent(xyz: Point3d, fraction: number, tangent: Vector3d): void announce a single point with its fraction and tangent. announceSegmentInterval(cp: CurvePrimitive, point0: Point3d, point1: Point3d, numStrokes: number, fraction0: number, fraction1: number): void Announce numPoints interpolated between point0 and point1, with associated fractions endCurvePrimitive(cp: CurvePrimitive): void Announce that all data about cp has been announced. endParentCurvePrimitive(cp: CurvePrimitive): void Announce that all data about the parent primitive has been announced. needPrimaryGeometryForStrokes(): boolean Optional OPTIONAL method for a handler to indicate that it wants primary geometry (e.g. startCurvePrimitive(cp: CurvePrimitive): void Announce the curve primitive that will be described in subsequent calls. startParentCurvePrimitive(cp: CurvePrimitive): void announce a parent curve primitive Defined in geometry3d/GeometryHandler.ts Line 279 Last Updated: 12 June, 2024