How to redraw a figure scaled to a specific height and width in canvas? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 3

How to redraw a figure scaled to a specific height and width in canvas?

So here is a figure whose starting x is 100 and ending x is 260 ,y is 105 and ending y is 215 ,so how would you go about calculating the new height and width for this figure according to user input ? I tried but it works well for width only ,not height ,can anyone help me somehow! Ty in advance The original heart figure that I am trying to scale is commented out just before the arr to which I am pushing it's coordinates https://code.sololearn.com/WaquucARe5Df/?ref=app

1st Sep 2020, 12:53 PM
Abhay
Abhay - avatar
1 ответ
+ 3
Mirielle ty i get it
1st Sep 2020, 2:04 PM
Abhay
Abhay - avatar