Kevin Lubick | 933ea8c | 2020-01-06 08:10:05 -0500 | [diff] [blame^] | 1 | // Adds in the code to use pathops with SkPath |
2 | CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; | ||||
3 | CanvasKit._extraInitializations.push(function() { | ||||
4 | CanvasKit.SkPath.prototype.op = function(otherPath, op) { | ||||
5 | if (this._op(otherPath, op)) { | ||||
6 | return this; | ||||
7 | } | ||||
8 | return null; | ||||
9 | }; | ||||
10 | |||||
11 | CanvasKit.SkPath.prototype.simplify = function() { | ||||
12 | if (this._simplify()) { | ||||
13 | return this; | ||||
14 | } | ||||
15 | return null; | ||||
16 | }; | ||||
17 | }); |