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:
calixteman 2023-08-10 14:16:46 +02:00 committed by GitHub
commit d4ba312f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;