2020-10-07 20:09:22 +00:00
|
|
|
// Adds in the code to use pathops with Path
|
2020-01-06 13:10:05 +00:00
|
|
|
CanvasKit._extraInitializations = CanvasKit._extraInitializations || [];
|
|
|
|
CanvasKit._extraInitializations.push(function() {
|
2020-10-07 20:09:22 +00:00
|
|
|
CanvasKit.Path.prototype.op = function(otherPath, op) {
|
2020-01-06 13:10:05 +00:00
|
|
|
if (this._op(otherPath, op)) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
|
2020-10-07 20:09:22 +00:00
|
|
|
CanvasKit.Path.prototype.simplify = function() {
|
2020-01-06 13:10:05 +00:00
|
|
|
if (this._simplify()) {
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
};
|
2020-10-07 20:09:22 +00:00
|
|
|
});
|