We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7cb062 commit 30dbe14Copy full SHA for 30dbe14
jspdf.js
@@ -1045,6 +1045,13 @@ var jsPDF = (function(global) {
1045
return this.lines([[x2 - x1, y2 - y1]], x1, y1);
1046
};
1047
1048
+ API.clip = function() {
1049
+ // By patrick-roberts, github.com/MrRio/jsPDF/issues/328
1050
+ // Call .clip() after calling .rect() with a style argument of null
1051
+ out('W') // clip
1052
+ out('S') // stroke path; necessary for clip to work
1053
+ };
1054
+
1055
/**
1056
* Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
1057
* All data points in `lines` are relative to last line origin.
0 commit comments