Hello, I'd like the following features to be implemented if possible, for greater synergy between Canvas and Sprite objects:
Canvas: Copy from Sprite (animation frame)
Canvas: Copy to Sprite (animation frame)
Canvas would attempt to fit whatever it can into Sprite, filling it with the image. Canvas can take any shape and amount of textures, while Sprite contains one full texture per frame. If no animation frame is specified, the default is assumed. Canvas should respect the current filter and opacity setting of the sprite.
Canvas: Copy from Sprite (animation frame) to (X,Y offset within Canvas)
Essentially the same as Paste Object at given coordinates.
Canvas: Copy to Sprite (animation frame) from (X,Y offset within Canvas)
The reverse of Paste Object, Sprite's texture is changed to the texture within Canvas, beginning at given offset coordinates and ending at the offset + Sprite's texture size
Canvas can be freely resizable, while Sprite just stretches its texture. Sometimes we may want the Sprite to change its texture size (not the current size, which just stretches it):
Sprite: Change texture size (width, height)
That's not all - Sprite can have a collision mask, so it would be good to be able to copy the image from Canvas to Sprite as collision mask rather than animation frame. Obviously it should go both ways, so we can alter the Sprite's current collision mask.
Canvas: Copy to Sprite (collision mask)
Canvas: Copy from Sprite (collision mask)
The above methods would give us greater freedom in sprite and canvas manipulation. Let me supply a few example cases:
a) Tileset - Canvas contains the tileset, Sprite represents a tile. At start of the layout, Canvas pastes from a sprite containing the full tileset and then copies individual tiles to tile sprites as necessary. The tileset may freely be changed and the tile sprites updated accordingly (imagine switching between summer and winter tilesets).
b) Character customization - Canvas copies from sprites containing base graphics (white skin, red hat, blue jacket, pink pants), merges them and then copies the new image to Player sprite. The whole process can be repeated for each animation frame!
Base images are stored in separate sprites, which can be tinted differently (color filter, etc.).
c) Visible damage - Paste sprite into Canvas, erase a part of the image, copy it back to the sprite. If the sprite uses per-pixel collisions, we have deformable terrain. Alternatively, copy the image to sprite as collision mask.