Author |
Topic  |
|
supersk
  
100 Posts |
Posted - May 21 2017 : 22:41:41
|
 I used RulerBox Demo to show ruler on the top of image, I know the real width of image is 320mm, but the ruler show 165, how can I change it? |
|
xequte
    
38790 Posts |
Posted - May 23 2017 : 22:55:21
|
Hi
Under the units menu, did you try changing to millimeters?
Also, please do not use the RulerBox demo if you want to add rulers to a TImageEnView. Please see:
Demos\Other\ImageEnViewRulers\ImageEnViewRulers.dpr
This uses the new Ruler properties of TImageEnView.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
supersk
  
100 Posts |
Posted - May 24 2017 : 20:57:11
|
Hi Nigel before displaying ruler, I used the following code to measure distance, ALL is OK: fHPixProportion = fRealWidth / ImgDataWidth; ImageEnVect1->SetScaleFromPixels(1, fHPixProportion); ImageEnVect1->MouseInteractVt = TIEMouseInteractVt() <<miPutRuler; but when I show ruler using the next code, the measure result is error, Why? ImageEnVect1->ShowRulers = TRulerDirs() << rdHorizontal << rdVertical; ImageEnVect1->RulerParams->Units = ieruMillimeters; const double InchToMM = 25.46;/*Right*/ //25.39999918;Error! ? double ImgSizeInch = fRealWidth/InchToMM; fHPixProportion = fRealWidth / ImgDataWidth; ImageEnVect1->IO->Params->DpiX = ImgDataWidth/ImgSizeInch; ImageEnVect1->IO->Params->DpiY = ImgDataWidth/ImgSizeInch; ImageEnVect1->SetScaleFromPixels(1, fHPixProportion); ImageEnVect1->MouseInteractVt = TIEMouseInteractVt() <<miPutRuler;
|
 |
|
supersk
  
100 Posts |
Posted - Jun 01 2017 : 22:21:55
|
Change DipX#65292;why the SetScaleFromPixels(1, fHPixProportion) also change#65311; |
 |
|
xequte
    
38790 Posts |
Posted - Jun 02 2017 : 17:18:48
|
Hi
Are you able to create a very small demo that illustrates the issue and email it to me?
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
|
Topic  |
|
|
|