I want to draw exact 2cm line in javascript, I have already drawn it by using below calculations.
Screen resolution is 1366 x 768
LCD diagonal 18.5
i have calculated ppi also
ppi = (1366*1366 + 768*768) / 18.5 = 85 ppi
also
pixels per cm = 85 / 2.54 = 33.46 ppcm
now if i draw a line of 33.46
pixels it will exacly equals to 1 cm
, and if i draw a line 33.46 *2
pixels it will equal to 2cm.
Question : how can I draw exactly 1cm or 2cm line on any other screen who's specs are unknown to me ?
Best Regards .