Open Viet281101 opened 1 month ago
- Changed
script.js
andeventHandlers.js
so that the background can be transparent on the canvas and when save images to PNG
This sounds like a really convenient change!
I only changed 2 lines in the JS, the rest is to create the grid board background with css and barely touched the other parts 😅. Small change but big improvement. Tell me if you like this version of pixel paint and give this PR a review. Or if you want to adjust the size of the squares in the grid board background
For example:
Or
Or
Although the third one would probably make the grid
tool redundant. So in my opinion the second one iz the best.
Although the third one would probably make the
grid
tool redundant. So in my opinion the second one iz the best.
I was gonna say the 3rd one but you've convinced me with this comment. It does make the grid more redundant. Let's go with the 2nd one 👍
What is it?
Description of the changes in your PR
main.css
to make the grid background for the canvas transparentscript.js
andeventHandlers.js
so that the background can be transparent on the canvas and when save images to PNGBefore/After Screenshots/Screen Record
Before:![Screenshot from 2024-05-24 21-59-52](https://github.com/Kully/pixel-paint/assets/77735678/5ed3d0ad-4218-4aef-b141-87125bf38c65)
After:![Screenshot from 2024-05-24 20-47-09](https://github.com/Kully/pixel-paint/assets/77735678/a697a137-acc6-4c2a-8f29-504a31b1b375)
Fixes the following issue(s)
Reasons for doing this PR
I like drawings with transparent backgrounds so it's easier to use them without having to use external conversion tools to change the background color from white to transparent with icon images or something else. Beside, if you still want the white background as before you can still use white
fill
on the canvas before starting your painting.