About
I wanted to make this as a program for someone's OS, but I thought it'd be neat if it had its own nice little window management system. Obvious inspiration from PearOS, the OS in question.
Canvas is mainly used for simply editing multiple images at once, and also being able to have text/ascii art in your images, saved in a neat, easy-to-use format. Obviously since not many programs today know of or use this format, the editor also allows you to save your images as "script objects," where you can load them from a script, and draw them accordingly, without the need for an external API.
myImage = dofile('path/to/image/file')
myImage:draw(5,5)
Canvas can also load images from the default paint program.
Usage
I can imagine the editor being a bit of a learning curve, but here's the run-down:
- Right-click outside of a window:
- New.. - Make a new image. Creates a new window for that image with the specified name.
- Open.. - Open an image.
- Exit - Leave the program.
- Right-click the title bar of an image:
- Load.. - replace the current image of that window with a new one from file
- Save - Save your image. It will be saved with the name/path you've given on creation.
- Save as Script Object - Save your image with the ability to be loaded with dofile() and drawn.
- Rename - Give the image a new name.
- Close - Close the window.
- Editing controls:
- Click and drag the titlebar to move windows around.
- Click and drag the pixel to the bottom right of the window to resize your image. Not actually in the window, the corner right outside of it.
- Double click the title bar of a window to maximize/minimize it.
- Press tab to switch between windows.
- Left-click/drag in the window to draw your image. A gray background with white dots is transparency.
- Right-click/drag to erase.
- Middle-click to pick a color.
- Click the colored pixel in the top-right of the window to change the current painting color for that window.
- Press left ctrl to change from painting to typing/ascii mode in the selected window. Type to input characters like you normally would, click and use arrow keys to change cursor position.
Additional Notes
This program is merely a preview, is missing some planned features, and is bound to have a couple of bugs or two, so don't expect it to be perfect.
When you resize an image, only what is visible in that window will be saved. The rest of the image is trimmed from the file. Keep that in mind.
A lot of comments in the code are either planned features, or just implemented features I forgot to take note of.
Screenshots
Spoiler
Download
pastebin get uekZ70QR canvas