Lines Matching refs:path
48 JSArray EMSCRIPTEN_KEEPALIVE ToCmds(const SkPath& path) {
50 for (auto [verb, pts, w] : SkPathPriv::Iterate(path)) {
94 SkPath path;
97 // if there are not enough arguments, bail with the path we've constructed so far.
109 path.moveTo(x1, y1);
114 path.lineTo(x1, y1);
120 path.quadTo(x1, y1, x2, y2);
127 path.conicTo(x1, y1, x2, y2, x3);
134 path.cubicTo(x1, y1, x2, y2, x3, y3);
137 path.close();
140 SkDebugf(" path: UNKNOWN command %f, aborting dump...\n", cmds[i-1]);
147 return emscripten::val(path);
210 JSString EMSCRIPTEN_KEEPALIVE ToSVGString(const SkPath& path) {
212 SkParsePath::ToSVGString(path, &s);
222 SkPath path;
223 if (SkParsePath::FromSVGString(str.c_str(), &path)) {
224 return emscripten::val(path);
233 bool EMSCRIPTEN_KEEPALIVE ApplySimplify(SkPath& path) {
234 return Simplify(path, &path);
250 SkPath path;
251 if (builder.resolve(&path)) {
252 return emscripten::val(path);
261 void EMSCRIPTEN_KEEPALIVE ToCanvas(const SkPath& path, emscripten::val /* Path2D or Canvas*/ ctx) {
262 SkPath::Iter iter(path, false);
298 emscripten::val EMSCRIPTEN_KEEPALIVE ToPath2D(const SkPath& path) {
300 ToCanvas(path, retVal);
307 void ApplyAddRect(SkPath& path, SkScalar x, SkScalar y, SkScalar width, SkScalar height) {
308 path.addRect(x, y, x+width, y+height);
311 void ApplyAddArc(SkPath& path, SkScalar x, SkScalar y, SkScalar radius,
317 path.addPath(temp, SkPath::kExtend_AddPathMode);
320 void ApplyEllipse(SkPath& path, SkScalar x, SkScalar y, SkScalar radiusX, SkScalar radiusY,
322 // This is easiest to do by making a new path and then extending the current path
331 path.addPath(temp, m, SkPath::kExtend_AddPathMode);
345 JSString GetFillTypeString(const SkPath& path) {
346 if (path.getFillType() == SkPathFillType::kWinding) {
348 } else if (path.getFillType() == SkPathFillType::kEvenOdd) {
360 bool ApplyDash(SkPath& path, SkScalar on, SkScalar off, SkScalar phase) {
368 if (pe->filterPath(&path, path, &rec, nullptr)) {
371 SkDebugf("Could not make dashed path\n");
375 bool ApplyTrim(SkPath& path, SkScalar startT, SkScalar stopT, bool isComplement) {
383 if (pe->filterPath(&path, path, &rec, nullptr)) {
386 SkDebugf("Could not trim path\n");
400 bool ApplyStroke(SkPath& path, StrokeOpts opts) {
408 return p.getFillPath(path, &path);
598 // e.g. path.transform([0,1,2,3,4,5,6,7,8])