mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 04:19:30 +08:00
修复layout的bug
This commit is contained in:
parent
d47c18105d
commit
9639f8670e
@ -64,7 +64,13 @@ export class Layout {
|
||||
if (img instanceof Path2D) {
|
||||
this.ctx.fill(img);
|
||||
} else {
|
||||
this.ctx.drawImage(img, sx, sy, sw!, sh!, dx!, dy!, dw!, dh!);
|
||||
if (!has(sw)) {
|
||||
this.ctx.drawImage(img, sx, sy);
|
||||
} else if (!has(dx)) {
|
||||
this.ctx.drawImage(img, sx, sy, sw, sh!);
|
||||
} else {
|
||||
this.ctx.drawImage(img, sx, sy, sw, sh!, dx, dy!, dw!, dh!);
|
||||
}
|
||||
}
|
||||
};
|
||||
if (type & Layout.IMAGE) {
|
||||
|
Loading…
Reference in New Issue
Block a user