TF1 not drawn correctly when saving as png

Hi,
The following macro doesn’t save correctly to .png format (the TF1 doesn’t get drawn over the full x-range). The .eps version looks fine.

[code]#include “TFile.h”
#include “TCanvas.h”
#include “TF1.h”

void testDraw(){

TCanvas* c1 = new TCanvas(“c1”,“c1”,0,0,900,900);

TF1 fa2 = new TF1(“fa2”,"1.0/sqrt(2x) * TMath::Exp(-x)",0,35);

fa2->SetLineColor(kViolet);
fa2->SetLineStyle(7);
fa2->SetLineWidth(2);

fa2->Draw("");

c1->SaveAs(“testDraw.png”);
c1->SaveAs(“testDraw.eps”);

}
[/code]

I am using ROOT version 5.32.03, but I have verified the same problem in version 5.28.00g. The .png
problem only occurs when running the macro in batch mode, not when running interactively. Also,
the problem occurs for LineStyle 7, but not LineStyle 1.

-Brian


Yes, weird. I will check.

This problem is now fixed in the SVN trunk.
Thanks fro reporting.