ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to change to ruler display
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

99 Posts

Posted - May 21 2017 :  22:41:41  Show Profile  Reply



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

38615 Posts

Posted - May 23 2017 :  22:55:21  Show Profile  Reply
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
Go to Top of Page

supersk

99 Posts

Posted - May 24 2017 :  20:57:11  Show Profile  Reply
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;

Go to Top of Page

supersk

99 Posts

Posted - Jun 01 2017 :  22:21:55  Show Profile  Reply
Change DipX#65292;why the SetScaleFromPixels(1, fHPixProportion) also change#65311;
Go to Top of Page

xequte

38615 Posts

Posted - Jun 02 2017 :  17:18:48  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: