xref: /aosp_15_r20/external/skia/modules/canvaskit/pathops.js (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1// Adds in the code to use pathops with Path
2CanvasKit._extraInitializations = CanvasKit._extraInitializations || [];
3CanvasKit._extraInitializations.push(function() {
4  CanvasKit.Path.prototype.op = function(otherPath, op) {
5    if (this._op(otherPath, op)) {
6      return this;
7    }
8    return null;
9  };
10
11  CanvasKit.Path.prototype.simplify = function() {
12    if (this._simplify()) {
13      return this;
14    }
15    return null;
16  };
17});
18