I have a Window_Base, inside of which I've created a Sprite_Base with a bitmap.
This displays an image (woot).
I have figured out how to use setFrame() on the sprite to crop the image and make parts of it get cut off.
However, it always draws from the upper left of the frame, and therefore cuts off to the right and bottom.
How can I cut off the top or left of the image? The bitmap doesn't appear to have an anchor that specifies where it's attached to the sprite, and changing the sprite's anchor makes it go haywire out of the window containing it.
Am I approaching this entirely the wrong way?
Edit: I feel the answer is in Bitmap.blt, but I can't figure out how to make it produce a visual result. It seems to draw nothing. For example,
This displays an image (woot).
I have figured out how to use setFrame() on the sprite to crop the image and make parts of it get cut off.
However, it always draws from the upper left of the frame, and therefore cuts off to the right and bottom.
How can I cut off the top or left of the image? The bitmap doesn't appear to have an anchor that specifies where it's attached to the sprite, and changing the sprite's anchor makes it go haywire out of the window containing it.
Am I approaching this entirely the wrong way?
Edit: I feel the answer is in Bitmap.blt, but I can't figure out how to make it produce a visual result. It seems to draw nothing. For example,
Code:
let bar = ImageManager.loadPicture("test");
this.contents.blt(bar, 0, bar.height * percentage, bar.width, bar.height - bar.height * percentage, 0, 0);