[Editor] Avoid to have slightly truncated images because of non-integer canvas dimensions
This commit is contained in:
parent
f89020e9b1
commit
b6b51f57ed
@ -338,6 +338,8 @@ class StampEditor extends AnnotationEditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#drawBitmap(width, height) {
|
#drawBitmap(width, height) {
|
||||||
|
width = Math.ceil(width);
|
||||||
|
height = Math.ceil(height);
|
||||||
const canvas = this.#canvas;
|
const canvas = this.#canvas;
|
||||||
if (!canvas || (canvas.width === width && canvas.height === height)) {
|
if (!canvas || (canvas.width === width && canvas.height === height)) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user