From 0de97b9df5124dbe85ca66274c78c6cc69c49b5d Mon Sep 17 00:00:00 2001 From: Nikita Khromov Date: Tue, 7 Oct 2025 19:11:15 +0700 Subject: [PATCH] [pdf] Fix draw redact clip --- pdf/src/drawings/drawingPrototype.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pdf/src/drawings/drawingPrototype.js b/pdf/src/drawings/drawingPrototype.js index 91cd96bb14..1ef0d95ca3 100644 --- a/pdf/src/drawings/drawingPrototype.js +++ b/pdf/src/drawings/drawingPrototype.js @@ -421,15 +421,6 @@ const y2 = Math.max(r[1], r[3]); return [x1, y1, x2, y2]; } - function intersectRect(a, b) { - a = normRect(a); - b = normRect(b); - const x1 = Math.max(a[0], b[0]); - const y1 = Math.max(a[1], b[1]); - const x2 = Math.min(a[2], b[2]); - const y2 = Math.min(a[3], b[3]); - return (x1 < x2 && y1 < y2) ? [x1, y1, x2, y2] : null; - } this.Recalculate(); if (this.IsEditFieldShape()) { @@ -537,8 +528,8 @@ this.draw(oGraphicsWord); if (unredactedPolygon) { - oGraphicsWord.m_oContext.restore(); - oGraphicsWord.m_oContext.restore(); + oGraphicsWord.restore(); + oGraphicsWord.restore(); } }; CPdfDrawingPrototype.prototype.onMouseDown = function(x, y, e) {};