Page 1 of 1

Resolution Metafile

Posted: Thu Oct 23, 2008 7:50 pm
by 10546313
Hi,

I use the TeecrateMetafile(true...) function to export a teechart, but it seems that this depends on the resolution of the screen. I think it must be a vector, but if I resize the resolution of the screen ( for example 640x400) the resolution of the Metafile was also decreased.
How can I create a Metafile with full resolution especially for the curves.
(My customers said that his grandma was able to paint it better).

It was the same as the topic http://www.teechart.net/support/viewtop ... t=metafile

I have read the article about the enhanced printing, but it doesn't help.

best regards
Werner

Posted: Fri Oct 24, 2008 7:48 am
by narcis
Hi Werner,

Have you tried making the chart bigger before printing as described here?

Thanks in advance.

Print quality

Posted: Fri Oct 24, 2008 8:41 am
by 10546313
Hi Narcis,
yes I have tried this, but this has other disadvantiges.
The legend, axis numbers and all other objects on the chart was too small.
Is there a way to adjust the size of the other objects ?

I have some objects on the chart.canvas painted.

best regards
Werner

Posted: Mon Oct 27, 2008 12:36 pm
by narcis
Hi Werner,

Using code below we don't see "small" objects, they are proportional. You can also modify FontZoom value at Chart.Aspect.FontZoom.

Code: Select all

procedure TForm1.BitBtn2Click(Sender: TObject);
var tmpMeta: TMetafile;
begin

  Chart1.Height:=Round(1.0*Printer.PageHeight*Chart1.Width/Printer.PageWidth);


  tmpMeta := Chart1.TeeCreateMetafile(True,Chart1.ClientRect);
  try
//    Printer.Orientation := poLandscape;
    Printer.BeginDoc;
    try
      Printer.Canvas.StretchDraw(Rect(10,10,Printer.PageWidth - 10, Printer.PageHeight - 10),tmpMeta);
    finally
      Printer.EndDoc;
    end;
  finally
    tmpMeta.Free;
  end;
end;

Metafile

Posted: Tue Oct 28, 2008 9:13 am
by 10546313
Dear Narcis,

for better resolution of a metafile you have to make not only the height bigger, but also the width.
for example :

Code: Select all

chart.widht:=10*chart.width;
chart.height:=10*chart.height;
Now all the fonts are very small. Increasing the Fontzoom to 1000 helps,
but the legend is to small to display the checkboxes.

What could I do ?
best regards
Werner

Posted: Thu Oct 30, 2008 3:57 pm
by narcis
Hi Werner,

We have done several tests here using the code I posted and worked fine for us here using 8.04. Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know the TeeChart version you are using?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Thu Nov 13, 2008 6:51 am
by 10546313
Dear Narcis,

I have upload the sample showing the problem. Please take a look to the legend, the checkboxes was not printed . It was too small.

best regards
Werner

Posted: Wed Dec 03, 2008 1:04 pm
by narcis
Hi Werner,

First of all we'd like to apologise for the delayed reply.

Thanks for the example project.

You could try doing something like this:

Code: Select all

with TEMFExportFormat.Create() do
begin
   try
        Panel := frxchart;
        Width := frxChart.Width;
        Height := frxChart.Height;
        Enhanced := true;
        SaveToFile(SaveDialog1.FileName);
   finally
        Free;
   end;
end;
This way it would be exported as in the editor but here you can change width and height.