Resolution Metafile

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Werner
Newbie
Newbie
Posts: 46
Joined: Mon Aug 06, 2007 12:00 am

Resolution Metafile

Post by Werner » Thu Oct 23, 2008 7:50 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 24, 2008 7:48 am

Hi Werner,

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

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Werner
Newbie
Newbie
Posts: 46
Joined: Mon Aug 06, 2007 12:00 am

Print quality

Post by Werner » Fri Oct 24, 2008 8:41 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 27, 2008 12:36 pm

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;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Werner
Newbie
Newbie
Posts: 46
Joined: Mon Aug 06, 2007 12:00 am

Metafile

Post by Werner » Tue Oct 28, 2008 9:13 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 30, 2008 3:57 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Werner
Newbie
Newbie
Posts: 46
Joined: Mon Aug 06, 2007 12:00 am

Post by Werner » Thu Nov 13, 2008 6:51 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Dec 03, 2008 1:04 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply