Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions plugins/context2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
if (window.outIntercept) {
lines = window.outIntercept.type === 'group' ? window.outIntercept.stream : window.outIntercept;
} else {
lines = this.pdf.internal.pages[1];
lines = this.internal.getCurrentPage();
}
lines.push("q");
var origPath = this.path;
Expand Down Expand Up @@ -326,7 +326,7 @@
if (window.outIntercept) {
lines = window.outIntercept.type === 'group' ? window.outIntercept.stream : window.outIntercept;
} else {
lines = this.pdf.internal.pages[1];
lines = this.internal.getCurrentPage();
}
lines.push("q");
var origPath = this.path;
Expand Down Expand Up @@ -831,7 +831,7 @@
if (window.outIntercept) {
lines = window.outIntercept.type === 'group' ? window.outIntercept.stream : window.outIntercept;
} else {
lines = this.pdf.internal.pages[1];
lines = this.internal.getCurrentPage();
}
lines.push("q");

Expand Down Expand Up @@ -953,7 +953,7 @@
if (window.outIntercept) {
lines = window.outIntercept.type === 'group' ? window.outIntercept.stream : window.outIntercept;
} else {
lines = this.pdf.internal.pages[1];
lines = this.internal.getCurrentPage();
}
lines.push("q");

Expand Down Expand Up @@ -982,7 +982,7 @@
if (window.outIntercept) {
lines = window.outIntercept.type === 'group' ? window.outIntercept.stream : window.outIntercept;
} else {
lines = this.pdf.internal.pages[1];
lines = this.internal.getCurrentPage();
}

// if (this.ctx._clip_path.length > 0) {
Expand Down Expand Up @@ -1518,6 +1518,10 @@
return curves;
};

c2d.internal.getCurrentPage = function () {
return this.pdf.internal.pages[this.pdf.internal.getCurrentPageInfo().pageNumber];
};

/**
* Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.
*
Expand Down