What formula does TeeChart use to calculate font sizes for printing from
Printresolution?
I just want the font sizes on the printout to always be 10 point regardless
of screen size, printer resolution, physical output size etc.
I can't come up with a way of setting PrintResolution that will give me a
consistent printer font size for axes labels, title, legends etc.
Thanks
Steve Sidwell
Printresolution
-
- Newbie
- Posts: 5
- Joined: Tue Jan 07, 2003 5:00 am
- Location: Florida
-
- Newbie
- Posts: 5
- Joined: Tue Jan 07, 2003 5:00 am
- Location: Florida
Printresolution
After a lot of trial and error this seems to work:
pixperinch := getdevicecaps(printer.handle, LOGPIXELSY);
factor := pixperinch / screen.PixelsPerInch;
w1 := (prect.Bottom - prect.Top);
w2 := round(aChart.height * factor);
aChart.PrintResolution := -(w1 - w2) * 100 div w2;
aChart.PrintPartialCanvas(printer.Canvas, prect);
The fonts always come out the same same now regardless of the size of the chart on screen, the size of the rectangle on the print canvas or the printer resolution.
Please can you confirm this is correct?
Thanks
Steve Sidwell
pixperinch := getdevicecaps(printer.handle, LOGPIXELSY);
factor := pixperinch / screen.PixelsPerInch;
w1 := (prect.Bottom - prect.Top);
w2 := round(aChart.height * factor);
aChart.PrintResolution := -(w1 - w2) * 100 div w2;
aChart.PrintPartialCanvas(printer.Canvas, prect);
The fonts always come out the same same now regardless of the size of the chart on screen, the size of the rectangle on the print canvas or the printer resolution.
Please can you confirm this is correct?
Thanks
Steve Sidwell
Hi, Steve.
The scaling is calculated internally in the TeeProcs.pas unit, more speficically, in the Procedure TCustomTeePanel.CalcMetaBounds and TCustomTeePanel.PrintPartialCanvas methods. The code you used is very close to the one we used. I've sent both methods sources to your email address.
The scaling is calculated internally in the TeeProcs.pas unit, more speficically, in the Procedure TCustomTeePanel.CalcMetaBounds and TCustomTeePanel.PrintPartialCanvas methods. The code you used is very close to the one we used. I've sent both methods sources to your email address.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
-
- Newbie
- Posts: 26
- Joined: Tue Apr 02, 2002 5:00 am
- Location: University of Oslo
- Contact:
Re: Printresolution
I tried this on some plot with several fastline graphics, but, I got nice fonts on labels, but, the graphs got very thick and very little information visible compared to the window presentation.8439995 wrote:After a lot of trial and error this seems to work:
pixperinch := getdevicecaps(printer.handle, LOGPIXELSY);
factor := pixperinch / screen.PixelsPerInch;
w1 := (prect.Bottom - prect.Top);
w2 := round(aChart.height * factor);
aChart.PrintResolution := -(w1 - w2) * 100 div w2;
aChart.PrintPartialCanvas(printer.Canvas, prect);
I for my part want the resolution of the graphs as with printresolution -100, but axis, ticks and fonts unchanged, so I really miss a switch telling that rescaling with printresolution -100 should only be done with graphs, not with axis, tics, fonts etc.
Now -100 gives invisible fonts (font size 0.001 or alike)
We need this for scientific publications.
(Fonts should then be 12 pt, axis line thickness about 1/2-1 mm etc.
Please have a look at http://folk.uio.no/achristo/ActiCalc/gr ... lution.htm for more details
Hi,
one way to solve this could be by chaning the FontZoom and Pen width before do the print :
Chart1.View3DOptions.FontZoom:=200;
Chart1.Axes.Left.Ticks.Width:=2;
one way to solve this could be by chaning the FontZoom and Pen width before do the print :
Chart1.View3DOptions.FontZoom:=200;
Chart1.Axes.Left.Ticks.Width:=2;
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 26
- Joined: Tue Apr 02, 2002 5:00 am
- Location: University of Oslo
- Contact: