Printing Annotations
-
- Newbie
- Posts: 1
- Joined: Fri Aug 01, 2003 4:00 am
Printing Annotations
Any suggestions as to why I cannot print annotations even though they are visible in the print preview window. I'm using Ver 6.01 with Delphi 7
Perhaps the problem is you're using "screen pixel coordinates" to position custom elements, etc. While this is fine for screen, it does not work so well for printing. The reason for this is internal TeeChart printing algorithm adjusts Chart size (for proportional printing). During this process custom positioned items keep the same coordinates. The end result is all custom object will generally not be on correct place when printed.
The workaround is to use alternative approach to print chart:
Josep Lluis Jorge
http://support.steema.com
The workaround is to use alternative approach to print chart:
Code: Select all
var tmpMeta: TMetaFile;
OldColor : TColor;
begin
Chart1.BevelOuter := bvNone;
OldColor := Chart1.Color;
Chart1.Color := clNone;
tmpMeta := Chart1.TeeCreateMetafile(true,Chart1.ClientRect);
try
Printer.Orientation := poLandscape;
Printer.BeginDoc;
try
Printer.Canvas.StretchDraw(Rect(1,1,Printer.PageWidth - 1,
Printer.PageHeight - 1),tmpMeta);
finally
Printer.EndDoc;
end;
finally
tmpMeta.Free;
Chart1.BevelOuter := bvRaised;
Chart1.Color := OldColor;
end;
end;
http://support.steema.com