Hello,
I'm have got a complex chart with many Series. Now I want to add something with Printer.Canvas while Printing with PrinterPartialCanvas. so i need the Pixel Position of the Axes while Printing the Chart, because e.g. BottomAxis.AxisPos is only for the Chart on screen. But I want to work with PrinterPartialCanvas. No, Metafiles!
Thank you very much
Bent Walther
Problem with Printing and AxisPos
-
- Newbie
- Posts: 7
- Joined: Fri Dec 23, 2005 12:00 am
Hi Bent,
to know the pixel position you will have to use similar code to the following when you print :
You can find more info about LptoDP method at :
http://msdn.microsoft.com/library/defau ... c_8vao.asp
to know the pixel position you will have to use similar code to the following when you print :
Code: Select all
: var P : TPoint;
if Chart1.Printing then
begin
P.X:=Chart1.Axes.Left.PosAxis;
P.Y:=Chart1.Axes.Bottom.PosAxis;
LPToDP(Chart1.Canvas.ReferenceCanvas.Handle,P,1);
// Now you have "P" point with physical coordinates
end;
http://msdn.microsoft.com/library/defau ... c_8vao.asp
Pep Jorge
http://support.steema.com
http://support.steema.com