Hi everyone, I'm trying to make a picture I draw in a window get clipped by the window's borders.
My window uses the code below, but the picture is displayed in the window in a smaller way, it is some distance from the border of the window.
I draw using drawPicture("pictureName", 0, 0), I tried modifying the parameters of this.contents.blt(Like changing this.contents.width to this.width), but it didn't seem to work, please give me some advice.
My window uses the code below, but the picture is displayed in the window in a smaller way, it is some distance from the border of the window.
JavaScript:
class Window_ThumbnailView extends Window_Base {
constructor() {
const rect = {
x: 452,
y: 262,
width: 552,
height: 312
}
super(rect)
}
drawPicture(filename, x, y) {
const bitmap = ImageManager.loadParallax(filename)
bitmap.addLoadListener(() => {
this.contents.blt(bitmap, 0, 0, bitmap.width, bitmap.height, x, y, this.contents.width, this.contents.height)
})
};
}
I draw using drawPicture("pictureName", 0, 0), I tried modifying the parameters of this.contents.blt(Like changing this.contents.width to this.width), but it didn't seem to work, please give me some advice.