How to print ?

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
aby
Posts: 81
Joined: 21 May 2007, 13:02
Location: Turkey

How to print ?

Post by aby » 25 Dec 2010, 18:51

Hi,

I need an example on how to print a drawing. I'm C++ oriented. I've found some examples on your help files. It seems Print View Area 2 example would suit to my needs.

I've examined this pascal source code and I understand that to print a zoomed rectangle to a printer you have to create a new Image and scaleit according to the desired rectangle by GetActualGraphic function. (True or false)?

Should I have to convert this example to Cpp or could you post a different example?

Thanks

Sabetay

aby
Posts: 81
Joined: 21 May 2007, 13:02
Location: Turkey

Re: How to print ?

Post by aby » 25 Dec 2010, 19:06

hi,

Could you translate the following line to cpp.

Result := TGraphicClass(sgImage1.Picture.Graphic.ClassType).Create;

Thanks

Aby

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: How to print ?

Post by support » 27 Dec 2010, 15:55

Hello Aby.
Print View Area 2 example is obsolete, it include old classes that was removed from the library version 7, sgImage1: TsgImage for example. This code can`t be just translated but modified for latest version. However, the Viewer demo include example of "Print View Area" functionality realization. Please see TForm1::pmiMetafileClick, TForm1::ActualGraphic functions.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply