Skip to content
Snippets Groups Projects
Commit 8be55b42 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

give test.ttf font proper name in standard location. Fix rose_image.C to

use this new font name and make font lookup $ROOTYS independent (in
case ROOT is installed in fixed --prefix location).


git-svn-id: http://root.cern.ch/svn/root/trunk@10712 27541ba8-7e3a-0410-8455-c3a389f83636
parent 5d4c8349
No related branches found
No related tags found
Loading
File moved
......@@ -19,11 +19,18 @@ void rose_image()
img->SetConstRatio(0);
img->SetImageQuality(TAttImage::kImgBest);
TString fp = gEnv->GetValue("Root.TTFontPath", "");
TString bc = fp + "/BlackChancery.ttf";
TString ar = fp + "/arial.ttf";
// draw text over image with funny font
img->DrawText(120, 160, "Hello World!", 32, gROOT->GetColor(4)->AsHexString(), "test.ttf", TImage::kShadeBelow);
img->DrawText(120, 160, "Hello World!", 32,
gROOT->GetColor(4)->AsHexString(),
bc, TImage::kShadeBelow);
// draw text over image with foreground specified by pixmap
img->DrawText(250, 350, "goodbye cruel world ...", 24, 0, "$ROOTSYS/fonts/arial.ttf", TImage::kPlain, "fore.xpm");
img->DrawText(250, 350, "goodbye cruel world ...", 24, 0,
ar, TImage::kPlain, "fore.xpm");
TImage *img2 = TImage::Open("mditestbg.xpm");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment