Lines Matching refs:SkPath
48 void VisitPath(const SkPath& p, VisitFunc&& f) { in VisitPath()
49 SkPath::RawIter iter(p); in VisitPath()
51 SkPath::Verb verb; in VisitPath()
52 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) { in VisitPath()
57 JSArray EMSCRIPTEN_KEEPALIVE ToCmds(const SkPath& path) { in ToCmds()
60 VisitPath(path, [&cmds](SkPath::Verb verb, const SkPoint pts[4], SkPath::RawIter iter) { in ToCmds()
63 case SkPath::kMove_Verb: in ToCmds()
66 case SkPath::kLine_Verb: in ToCmds()
69 case SkPath::kQuad_Verb: in ToCmds()
72 case SkPath::kConic_Verb: in ToCmds()
77 case SkPath::kCubic_Verb: in ToCmds()
83 case SkPath::kClose_Verb: in ToCmds()
86 case SkPath::kDone_Verb: in ToCmds()
107 SkPath path; in FromCmds()
163 SkPath EMSCRIPTEN_KEEPALIVE NewPath() { in NewPath()
164 return SkPath(); in NewPath()
167 SkPath EMSCRIPTEN_KEEPALIVE CopyPath(const SkPath& a) { in CopyPath()
168 SkPath copy(a); in CopyPath()
172 bool EMSCRIPTEN_KEEPALIVE Equals(const SkPath& a, const SkPath& b) { in Equals()
186 void ApplyArcTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, in ApplyArcTo()
191 void ApplyClose(SkPath& p) { in ApplyClose()
195 void ApplyConicTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, in ApplyConicTo()
200 void ApplyCubicTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, in ApplyCubicTo()
205 void ApplyLineTo(SkPath& p, SkScalar x, SkScalar y) { in ApplyLineTo()
209 void ApplyMoveTo(SkPath& p, SkScalar x, SkScalar y) { in ApplyMoveTo()
213 void ApplyQuadTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) { in ApplyQuadTo()
223 JSString EMSCRIPTEN_KEEPALIVE ToSVGString(const SkPath& path) { in ToSVGString()
235 SkPath path; in FromSVGString()
246 bool EMSCRIPTEN_KEEPALIVE ApplySimplify(SkPath& path) { in ApplySimplify()
250 bool EMSCRIPTEN_KEEPALIVE ApplyPathOp(SkPath& pathOne, const SkPath& pathTwo, SkPathOp op) { in ApplyPathOp()
254 SkPathOrNull EMSCRIPTEN_KEEPALIVE MakeFromOp(const SkPath& pathOne, const SkPath& pathTwo, SkPathOp… in MakeFromOp()
255 SkPath out; in MakeFromOp()
263 SkPath path; in ResolveBuilder()
274 void EMSCRIPTEN_KEEPALIVE ToCanvas(const SkPath& path, emscripten::val /* Path2D or Canvas*/ ctx) { in ToCanvas()
275 SkPath::Iter iter(path, false); in ToCanvas()
277 SkPath::Verb verb; in ToCanvas()
278 while ((verb = iter.next(pts, false)) != SkPath::kDone_Verb) { in ToCanvas()
280 case SkPath::kMove_Verb: in ToCanvas()
283 case SkPath::kLine_Verb: in ToCanvas()
286 case SkPath::kQuad_Verb: in ToCanvas()
289 case SkPath::kConic_Verb: in ToCanvas()
292 SkPath::ConvertConicToQuads(pts[0], pts[1], pts[2], iter.conicWeight(), quads, 1); in ToCanvas()
296 case SkPath::kCubic_Verb: in ToCanvas()
300 case SkPath::kClose_Verb: in ToCanvas()
303 case SkPath::kDone_Verb: in ToCanvas()
311 emscripten::val EMSCRIPTEN_KEEPALIVE ToPath2D(const SkPath& path) { in ToPath2D()
320 void ApplyAddRect(SkPath& path, SkScalar x, SkScalar y, SkScalar width, SkScalar height) { in ApplyAddRect()
324 void ApplyAddArc(SkPath& path, SkScalar x, SkScalar y, SkScalar radius, in ApplyAddArc()
326 SkPath temp; in ApplyAddArc()
330 path.addPath(temp, SkPath::kExtend_AddPathMode); in ApplyAddArc()
333 void ApplyEllipse(SkPath& path, SkScalar x, SkScalar y, SkScalar radiusX, SkScalar radiusY, in ApplyEllipse()
338 SkPath temp; in ApplyEllipse()
344 path.addPath(temp, m, SkPath::kExtend_AddPathMode); in ApplyEllipse()
348 void ApplyAddPath(SkPath& orig, const SkPath& newPath, in ApplyAddPath()
358 JSString GetFillTypeString(const SkPath& path) { in GetFillTypeString()
359 if (path.getFillType() == SkPath::FillType::kWinding_FillType) { in GetFillTypeString()
361 } else if (path.getFillType() == SkPath::FillType::kEvenOdd_FillType) { in GetFillTypeString()
373 bool ApplyDash(SkPath& path, SkScalar on, SkScalar off, SkScalar phase) { in ApplyDash()
388 bool ApplyTrim(SkPath& path, SkScalar startT, SkScalar stopT, bool isComplement) { in ApplyTrim()
413 bool ApplyStroke(SkPath& path, StrokeOpts opts) { in ApplyStroke()
440 void ApplyTransform(SkPath& orig, const SimpleMatrix& sm) { in ApplyTransform()
444 void ApplyTransform(SkPath& orig, in ApplyTransform()
483 class_<SkPath>("SkPath") in EMSCRIPTEN_BINDINGS()
485 .constructor<const SkPath&>() in EMSCRIPTEN_BINDINGS()
506 .function("setFillType", &SkPath::setFillType) in EMSCRIPTEN_BINDINGS()
507 .function("getFillType", &SkPath::getFillType) in EMSCRIPTEN_BINDINGS()
509 .function("getBounds", &SkPath::getBounds) in EMSCRIPTEN_BINDINGS()
510 .function("computeTightBounds", &SkPath::computeTightBounds) in EMSCRIPTEN_BINDINGS()
520 ….function("_transform", select_overload<void(SkPath& orig, const SimpleMatrix& sm)>(&ApplyTransfor… in EMSCRIPTEN_BINDINGS()
521 ….function("_transform", select_overload<void(SkPath& orig, SkScalar, SkScalar, SkScalar, SkScalar,… in EMSCRIPTEN_BINDINGS()
534 .function("dump", select_overload<void() const>(&SkPath::dump)) in EMSCRIPTEN_BINDINGS()
535 .function("dumpHex", select_overload<void() const>(&SkPath::dumpHex)) in EMSCRIPTEN_BINDINGS()
567 enum_<SkPath::FillType>("FillType") in EMSCRIPTEN_BINDINGS()
568 .value("WINDING", SkPath::FillType::kWinding_FillType) in EMSCRIPTEN_BINDINGS()
569 .value("EVENODD", SkPath::FillType::kEvenOdd_FillType) in EMSCRIPTEN_BINDINGS()
570 .value("INVERSE_WINDING", SkPath::FillType::kInverseWinding_FillType) in EMSCRIPTEN_BINDINGS()
571 .value("INVERSE_EVENODD", SkPath::FillType::kInverseEvenOdd_FillType); in EMSCRIPTEN_BINDINGS()