You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TBaseReport. PrintImageRect method |
Top Previous Next |
Declaration procedure PrintImageRect(X1,Y1,X2,Y2: double; ImageStream: TStream; ImageType: string);
Category
Description This method will draw ImageStream on the printer canvas stretched or shrunken to fit within the rectangle defined by the points (X1,Y1) and (X2,Y2).
See also TBaseReport Class, CalcGraphicHeight, CalcGraphicWidth, OnDecodeImage, PrintBitmap, StretchDraw
Example (Delphi) with Sender as TBaseReport do begin Stream := TMemoryStream.Create; Image := TJPEGImage.Create; try Image.LoadFromFile('image1.jpg'); Image.SaveToStream(Stream); Stream.Position := 0; PrintImageRect(1,1,3,3,Stream,'JPG'); finally Image.Free; Stream.Free end; {tryf} end; {with}
Example (C++Builder) TBaseReport *rp = dynamic_cast<TBaseReport*>(Sender); Stream = new TMemoryStream->Create(); Image = new TJPEGImage->Create(); try { Image->LoadFromFile("image1.jpg"); Image->SaveToStream(Stream); Stream->Position = 0; rp1->PrintImageRect(1,1,3,3,Stream, "JPG"); } finally { delete Image; delete Stream; }; {tryf} |
You are reading help file online using chmlib.com
|