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
 DoPrintPreviewDialog Error
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

95 Posts

Posted - Sep 18 2021 :  03:45:23  Show Profile  Reply
The code as follow, you will get the Print PreView Dialog, but if there is a measurement line on the image, the measurement value displayed on the image is different from that in the print preview, the error like attached image.
ImgEnMain->IO->DoPrintPreviewDialog(iedtDialog , Caption, true, "Print PreView", true);


supersk

95 Posts

Posted - Sep 18 2021 :  03:55:21  Show Profile  Reply
In addition, the same error occurs when you assign an imageenview to another imageenview.The code as follow#65306;
TIEBitmap *tmpIEBmp = new TIEBitmap;
tmpIEBmp->Width = DstImgWidth;
tmpIEBmp->Height = DstImgHeight;
tmpIEBmp->PixelFormat = imgTmpNavi->IEBitmap->PixelFormat;
imgTmpNavi->Assign(ImgEnMain);
imgTmpNavi->LayersMergeAll();
My ImageEn is 10.2, and IDE is 10.4
Go to Top of Page

xequte

38176 Posts

Posted - Sep 21 2021 :  00:08:29  Show Profile  Reply
Hi

This can happen if the TImageEnView has been scaled. Before assigning, ensure you call:


ImageEnView2.ScaleX := ImageEnView1.ScaleX;
ImageEnView2.ScaleY := ImageEnView1.ScaleY;

Before printing you will need to merge or set the text of line layers (i.e. by turning off ruler mode).

We will handle this automatically in the next update. You can email me for a pre-release if you like.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

supersk

95 Posts

Posted - Sep 24 2021 :  21:29:43  Show Profile  Reply
I set scale and rulerparas's unit as follow:
imgTmpNavi->ScaleX = ImgEnMain->ScaleX;
imgTmpNavi->ScaleY = ImgEnMain->ScaleY;
imgTmpNavi->RulerParams->Units = ImgEnMain->RulerParams->Units;
but it only works when scale equals 1.
Go to Top of Page

xequte

38176 Posts

Posted - Sep 24 2021 :  21:55:23  Show Profile  Reply
Hi

Please email me for the updated source code.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: