+ 4
[Solved]HTML canvas behaving abnormally
I have made a simple canvas code. But if I increase the height/width of the canvas the shapes changes their scale and behave abnormally. For example : I have a line ctx.moveTo(10, 10); ctx.lineTo(10, 20); This should create a straight line. Now if I increase the width of the canvas and re run the code the line gets longer.
5 Answers
+ 4
Got the answer by Tejas Buddy
https://code.sololearn.com/Wqh98ALN0h42/?ref=app
+ 4
Can you send your code?
+ 4
Canvas size and canvas element size are two different properties
See:
https://www.sololearn.com/post/119555/?ref=app
+ 3
I was just doing that Tejas đđ