mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #16820 from calixteman/editor_stamp_integer_dims
[Editor] Avoid to have slightly truncated images because of non-integer canvas dimensions
This commit is contained in:
commit
d4ba312f00
1 changed files with 2 additions and 0 deletions
|
@ -343,6 +343,8 @@ class StampEditor extends AnnotationEditor {
|
|||
}
|
||||
|
||||
#drawBitmap(width, height) {
|
||||
width = Math.ceil(width);
|
||||
height = Math.ceil(height);
|
||||
const canvas = this.#canvas;
|
||||
if (!canvas || (canvas.width === width && canvas.height === height)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue