File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
tutorials/visualisation/image Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1010
1111void img2pad ()
1212{
13- TImage * img = TImage ::Open ("$ROOTSYS/tutorials/visualisation/image/rose512.jpg" );
13+ TString fname = gROOT -> GetTutorialDir ();
14+ fname .Append ("/visualisation/image/rose512.jpg" );
15+ TImage * img = TImage ::Open (fname );
16+
1417 if (!img ) {
1518 printf ("Could not create an image... exit\n" );
1619 return ;
1720 }
21+
1822 img -> SetConstRatio (kFALSE );
1923 img -> Draw ("N" );
2024
@@ -26,16 +30,16 @@ void img2pad()
2630 /*img->Draw("T100,100,#556655");*/
2731 /*img->Draw("T100,100");*/
2832
29- TImage * i1 = TImage ::Open ("$ROOTSYS/tutorials/visualisation/image/rose512.jpg" );
33+ TImage * i1 = TImage ::Open (fname );
3034 i1 -> SetConstRatio (kFALSE );
3135 i1 -> Flip (90 );
32- TImage * i2 = TImage ::Open ("$ROOTSYS/tutorials/visualisation/image/rose512.jpg" );
36+ TImage * i2 = TImage ::Open (fname );
3337 i2 -> SetConstRatio (kFALSE );
3438 i2 -> Flip (180 );
35- TImage * i3 = TImage ::Open ("$ROOTSYS/tutorials/visualisation/image/rose512.jpg" );
39+ TImage * i3 = TImage ::Open (fname );
3640 i3 -> SetConstRatio (kFALSE );
3741 i3 -> Flip (270 );
38- TImage * i4 = TImage ::Open ("$ROOTSYS/tutorials/visualisation/image/rose512.jpg" );
42+ TImage * i4 = TImage ::Open (fname );
3943 i4 -> SetConstRatio (kFALSE );
4044 i4 -> Mirror (kTRUE );
4145
You can’t perform that action at this time.
0 commit comments