Lines Matching refs:SkPath
11 #include "include/core/SkPath.h"
37 // SkPath, but in an error case, something of type null (which is val) could also be
48 JSArray EMSCRIPTEN_KEEPALIVE ToCmds(const SkPath& path) {
86 // SkPath or SkOpBuilder.
94 SkPath path;
150 SkPath EMSCRIPTEN_KEEPALIVE NewPath() {
151 return SkPath();
154 SkPath EMSCRIPTEN_KEEPALIVE CopyPath(const SkPath& a) {
155 SkPath copy(a);
159 bool EMSCRIPTEN_KEEPALIVE Equals(const SkPath& a, const SkPath& b) {
173 void ApplyArcTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
178 void ApplyClose(SkPath& p) {
182 void ApplyConicTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
187 void ApplyCubicTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2,
192 void ApplyLineTo(SkPath& p, SkScalar x, SkScalar y) {
196 void ApplyMoveTo(SkPath& p, SkScalar x, SkScalar y) {
200 void ApplyQuadTo(SkPath& p, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2) {
210 JSString EMSCRIPTEN_KEEPALIVE ToSVGString(const SkPath& path) {
222 SkPath path;
233 bool EMSCRIPTEN_KEEPALIVE ApplySimplify(SkPath& path) {
237 bool EMSCRIPTEN_KEEPALIVE ApplyPathOp(SkPath& pathOne, const SkPath& pathTwo, SkPathOp op) {
241 SkPathOrNull EMSCRIPTEN_KEEPALIVE MakeFromOp(const SkPath& pathOne, const SkPath& pathTwo, SkPathOp op) {
242 SkPath out;
250 SkPath path;
261 void EMSCRIPTEN_KEEPALIVE ToCanvas(const SkPath& path, emscripten::val /* Path2D or Canvas*/ ctx) {
262 SkPath::Iter iter(path, false);
264 SkPath::Verb verb;
265 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
267 case SkPath::kMove_Verb:
270 case SkPath::kLine_Verb:
273 case SkPath::kQuad_Verb:
276 case SkPath::kConic_Verb:
279 SkPath::ConvertConicToQuads(pts[0], pts[1], pts[2], iter.conicWeight(), quads, 1);
283 case SkPath::kCubic_Verb:
287 case SkPath::kClose_Verb:
290 case SkPath::kDone_Verb:
298 emscripten::val EMSCRIPTEN_KEEPALIVE ToPath2D(const SkPath& path) {
307 void ApplyAddRect(SkPath& path, SkScalar x, SkScalar y, SkScalar width, SkScalar height) {
311 void ApplyAddArc(SkPath& path, SkScalar x, SkScalar y, SkScalar radius,
313 SkPath temp;
317 path.addPath(temp, SkPath::kExtend_AddPathMode);
320 void ApplyEllipse(SkPath& path, SkScalar x, SkScalar y, SkScalar radiusX, SkScalar radiusY,
325 SkPath temp;
331 path.addPath(temp, m, SkPath::kExtend_AddPathMode);
335 void ApplyAddPath(SkPath& orig, const SkPath& newPath,
345 JSString GetFillTypeString(const SkPath& path) {
360 bool ApplyDash(SkPath& path, SkScalar on, SkScalar off, SkScalar phase) {
375 bool ApplyTrim(SkPath& path, SkScalar startT, SkScalar stopT, bool isComplement) {
400 bool ApplyStroke(SkPath& path, StrokeOpts opts) {
427 void ApplyTransform(SkPath& orig, const SimpleMatrix& sm) {
431 void ApplyTransform(SkPath& orig,
458 // various functions. That is, we can make the SkPath we expose appear to have methods
459 // that the original SkPath does not, like rect(x, y, width, height) and toPath2D().
462 // must be SkPath& (the reference part is very important).
470 class_<SkPath>("SkPath")
472 .constructor<const SkPath&>()
493 .function("setFillType", select_overload<void(SkPathFillType)>(&SkPath::setFillType))
494 .function("getFillType", &SkPath::getFillType)
496 .function("getBounds", &SkPath::getBounds)
497 .function("computeTightBounds", &SkPath::computeTightBounds)
507 .function("_transform", select_overload<void(SkPath& orig, const SimpleMatrix& sm)>(&ApplyTransform))
508 .function("_transform", select_overload<void(SkPath& orig, SkScalar, SkScalar, SkScalar, SkScalar, SkScalar, SkScalar, SkScalar, SkScalar, SkScalar)>(&ApplyTransform))
521 .function("dump", select_overload<void() const>(&SkPath::dump))
522 .function("dumpHex", select_overload<void() const>(&SkPath::dumpHex))
534 // our types (e.g. SkPath)