how can i get mouse position in a image
Posted: Sun Jul 30, 2017 9:39 am
when a image is loaded,like that:
image = new RImageEntity(doc, RImageData(strImageFile, RVector(0,0),RVector(1,0), RVector(0,1), 50, 50, 0));
image->setInsertionPoint(drawSect->ptDemInsert);
double pWid = image->getPixelWidth() * xRes;
double pHei = image->getPixelHeight() * xRes;
image->setWidth(pWid);
image->setHeight(pHei);
image->setAngle(0);
when a mouse position is got, how can i get postion in the image?
xRes,yRes are pixel resolution
image = new RImageEntity(doc, RImageData(strImageFile, RVector(0,0),RVector(1,0), RVector(0,1), 50, 50, 0));
image->setInsertionPoint(drawSect->ptDemInsert);
double pWid = image->getPixelWidth() * xRes;
double pHei = image->getPixelHeight() * xRes;
image->setWidth(pWid);
image->setHeight(pHei);
image->setAngle(0);
when a mouse position is got, how can i get postion in the image?
xRes,yRes are pixel resolution