c# How to identify the cordinates on two diffrent size rectangle?

46 Views Asked by At

I have an image of width "ImageWidth",Height "ImageHeight" and PDF of width "PdfWidth",Height "PdfHeight". Both of them has same content(extact replica) but with diffrent dimensions.

Now I am Marking the location lets say (X, Y) on the image. How can I get the same Location in PDF?

Here is my code but it's not perfect

var x = Convert.ToInt32(PdfWidth * (XAxies / ImageWidth));
var y = Convert.ToInt32(PdfHeight - (PdfHeight * (YAxies /ImageHeight)));
0

There are 0 best solutions below