Page 1 of 1

How to print ?

Posted: 25 Dec 2010, 18:51
by aby
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

Re: How to print ?

Posted: 25 Dec 2010, 19:06
by aby
hi,

Could you translate the following line to cpp.

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

Thanks

Aby

Re: How to print ?

Posted: 27 Dec 2010, 15:55
by support
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.