Appends arc to Path, as the start of new contour. Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise. Returns the modified path for easier chaining.
Adds circle centered at (x, y) of size radius to the path. Has no effect if radius is zero or negative.
center of circle
center of circle
OptionalisCCW: booleanif the path should be drawn counter-clockwise or not
reference to SkPath
Adds oval to Path, appending kMove_Verb, four kConic_Verb, and kClose_Verb. Oval is upright ellipse bounded by Rect oval with radii equal to half oval width and half oval height. Oval begins at start and continues clockwise by default. Returns the modified path for easier chaining.
OptionalisCCW: booleanif the path should be drawn counter-clockwise or not
OptionalstartIndex: numberindex of initial point of ellipse
Takes 1, 2, 7, or 10 required args, where the first arg is always the path. The last arg is an optional boolean and chooses between add or extend mode. The options for the remaining args are:
Adds contour created from array of n points, adding (count - 1) line segments. Contour added starts at pts[0], then adds a line for every additional point in pts array. If close is true, appends kClose_Verb to Path, connecting pts[count - 1] and pts[0]. Returns the modified path for easier chaining.
if true, will add a line connecting last point to the first point.
Adds Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb, starting with top-left corner of Rect; followed by top-right, bottom-right, and bottom-left if isCCW is false; or followed by bottom-left, bottom-right, and top-right if isCCW is true. Returns the modified path for easier chaining.
OptionalisCCW: booleanAdds rrect to Path, creating a new closed contour. Returns the modified path for easier chaining.
OptionalisCCW: booleanAdds the given verbs and associated points/weights to the path. The process reads the first verb from verbs and then the appropriate number of points from the FlattenedPointArray (e.g. 2 points for moveTo, 4 points for quadTo, etc). If the verb is a conic, a weight will be read from the WeightList. The verb list should start with a moveTo since the previous location will be lost. Returns the modified path for easier chaining
the verbs that create this path, in the order of being drawn.
represents n points with 2n floats.
Optionalweights: WeightListused if any of the verbs are conics, can be omitted otherwise.
Adds an arc to this path, emulating the Canvas2D behavior. Returns the modified path for easier chaining.
OptionalisCCW: booleanAppends arc to Path. Arc added is part of ellipse bounded by oval, from startAngle through sweepAngle. Both startAngle and sweepAngle are measured in degrees, where zero degrees is aligned with the positive x-axis, and positive sweeps extends arc clockwise. Returns the modified path for easier chaining.
Appends arc to Path. Arc is implemented by one or more conics weighted to describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc curves from last Path Point to (x, y), choosing one of four possible routes: clockwise or counterclockwise, and smaller or larger. See SkPath.h for more details. Returns the modified path for easier chaining.
Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc is part of circle sized to radius, positioned so it touches both tangent lines. Returns the modified path for easier chaining.
Appends CLOSE_VERB to Path. A closed contour connects the first and last point with a line, forming a continuous loop. Returns the modified path for easier chaining.
Adds conic from last point towards (x1, y1), to (x2, y2), weighted by w. If Path is empty, or path is closed, the last point is set to (0, 0) before adding conic. Returns the modified path for easier chaining.
Returns true if the point (x, y) is contained by current Path, taking into account FillType.
Returns the number of points in this path. Initially zero.
Adds cubic from last point towards (x1, y1), then towards (x2, y2), ending at (x3, y3). If Path is empty, or path is closed, the last point is set to (0, 0) before adding cubic.
Returns an immutable Path with all the drawing so far and resets the internal buffers to be empty.
Returns an immutable Path with all the drawing so far and calls delete() on this JS object, freeing the memory associated with it.
Returns minimum and maximum axes values of Point array. Returns (0, 0, 0, 0) if Path contains no points. Returned bounds width and height may be larger or smaller than area affected when Path is drawn.
OptionaloutputArray: Rectif provided, the bounding box will be copied into this array instead of allocating a new one.
Returns true if there are no verbs in the path.
Adds line from last point to (x, y). If Path is empty, or last path is closed, last point is set to (0, 0) before adding line. Returns the modified path for easier chaining.
Adds beginning of contour at the given point. Returns the modified path for easier chaining.
Translates all the points in the path by dx, dy. Returns the modified path for easier chaining.
Adds quad from last point towards (x1, y1), to (x2, y2). If Path is empty, or path is closed, last point is set to (0, 0) before adding quad. Returns the modified path for easier chaining.
Relative version of arcToRotated.
Relative version of conicTo.
Relative version of cubicTo.
Returns an immutable Path with all the drawing so far. Keeps the current points, verbs, and weights for continued growth.
Takes a 3x3 matrix as either an array or as 9 individual params.
CanvasKit is built with Emscripten and Embind. Embind adds the following methods to all objects that are exposed with it. This _type field is necessary for the TypeScript compiler to differentiate between opaque types such as Shader and ColorFilter. It doesn't exist at runtime.