blob: a8a69f929747f265371ba67b8fffd9da87142f86 [file] [log] [blame]
Kevin Lubick54c1b3d2020-10-07 16:09:22 -04001// Adds in the code to use pathops with Path
Kevin Lubick933ea8c2020-01-06 08:10:05 -05002CanvasKit._extraInitializations = CanvasKit._extraInitializations || [];
3CanvasKit._extraInitializations.push(function() {
Kevin Lubick54c1b3d2020-10-07 16:09:22 -04004 CanvasKit.Path.prototype.op = function(otherPath, op) {
Kevin Lubick933ea8c2020-01-06 08:10:05 -05005 if (this._op(otherPath, op)) {
6 return this;
7 }
8 return null;
9 };
10
Kevin Lubick54c1b3d2020-10-07 16:09:22 -040011 CanvasKit.Path.prototype.simplify = function() {
Kevin Lubick933ea8c2020-01-06 08:10:05 -050012 if (this._simplify()) {
13 return this;
14 }
15 return null;
16 };
Kevin Lubick54c1b3d2020-10-07 16:09:22 -040017});