Pattern style 3004 looks different on screen and when saved into pdf

Hi,

this page claims the pattern style 3004 should look like this (with lines going from left to right from bottom to top):
image

Indeed, when I execute the following script in ROOT 6.26/04

        TCanvas* atlas_rectangular = new TCanvas("atlas_rectangular", "c1", 0., 0., 800, 600);
        TH1I* h = new TH1I("h", "My histogram;X;Y", 10, 0., 10.);
        h->Draw();

        TBox *box = new TBox(1., 0.2, 5., 0.5);
        box->SetFillStyle(3004);
        box->SetFillColor(kBlack);
        box->Draw();

        atlas_rectangular->SaveAs("fs3004.pdf");

, I get the expected picture on the screen

but in the pdf file the pattern is reversed, looking like 3005 (lines go from left to right from top to bottom):

Can somebody please look into this?

Thanks!


ROOT Version: ROOT 6.26/04
Platform: CentOs 7


I’m sure @couet will be interested by this :wink:

Yes me. I will check. Thanks for reporting.

Fix here: fix pdf patterns by couet · Pull Request #11745 · root-project/root · GitHub

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.