I have a canvas element in which i have drawn a circle. How do i give the responsiveness to the canvas element. If the width of the browser changes i need to change some amount of radius, if the height of the browser changes i need to change the some amount in radius. if both both changes i need to changes both in some amount. For that how i need to calculate the changing ratio?
var canvasWidthRatio = currentDivWidth / initialDivWidth;
var canvasHeightRatio = currentHeight / initialDivHeight;
radius=(some thing i need here).
please help me...
Aucun commentaire:
Enregistrer un commentaire