[CLOSED]Big canvas with sharp paintings | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

[CLOSED]Big canvas with sharp paintings

How can I create canvas element, set its size to 1000x1000 px and draw sharp paintings? My code: https://code.sololearn.com/WelwMFYZ27oS/?ref=app

28th Apr 2018, 4:17 AM
Amadeus
Amadeus - avatar
3 Answers
+ 2
You have to set width and height attributes on your canvas element also... width and height in canvas element represents internal size of canvas then if you dont set they (they have some default values) and show canvas with another size (in CSS) your canvas will draw and will be resized for match your css size (an you can get artifacts or strange distortions on it)
28th Apr 2018, 7:46 AM
KrOW
KrOW - avatar
+ 2
@KrOW thanks:)
28th Apr 2018, 7:52 AM
Amadeus
Amadeus - avatar
+ 2
👍👍👍👍
28th Apr 2018, 7:52 AM
KrOW
KrOW - avatar