You are reading help file online using chmlib.com
|
Rave Reports Developer Reference TBaseReport. CalcGraphicHeight method |
Top Previous Next |
Declaration function CalcGraphicHeight(Width: double; Graphic: TGraphic); double;
Category
Description This method will calculate and return the value for the new Height of the Graphic based on the Width value while maintaining the original ratio of the Graphic. This could be used to see if there is enough room left on the page before attempting to print the graphic. This can be used for both bitmaps and metafiles.
See also TBaseReport Class, CalcGraphicWidth, PrintBitmap, PrintBitmapRect, StretchDraw
Example (Delphi) Bitmap := TBitmap.Create; Bitmap.LoadFromFile('RpDEMO.BMP'); PrintBitmapRect(X1, Y1, X1 + 3.0, Y1 + CalcGraphicHeight(3.0,Bitmap),Bitmap); Bitmap.Free;
Example (C++Builder) Graphics::TBitmap* Bitmap; Bitmap = new Graphics::TBitmap(); Bitmap->LoadFromFile("RpDEMO.BMP"); rp1->PrintBitmapRect(X1, Y1, X1 + 3.0, Y1 + rp1->CalcGraphicHeight(3.0,Bitmap),Bitmap); delete Bitmap; |
You are reading help file online using chmlib.com
|