38 gROOT->Macro(
"$ROOTSYS/tutorials/visualisation/graphs/graph.C");
42 TImage *fore = dmp.GetImage();
45 gPad->SetCanvasSize(400, 300);
54 UInt_t rgb1 = color2rgb(bk1);
55 UInt_t rgb2 = color2rgb(bk2);
64 for (
UInt_t i = 0; i <
h; i++) {
65 for (
UInt_t j = 0; j <
w; j++) {
69 UInt_t col = argb[idx] & 0xffffff;
75 if ((col == rgb1) || (col == rgb2)) {
78 argb[idx] = 0xff000000 + col;
84 back->
Merge(fore,
"alphablend", 20, 20);
88 printf(
"*************** File trans_graph.png created ***************\n");
The color creation and management class.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual UInt_t * GetArgbArray()
virtual UInt_t GetWidth() const
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual UInt_t GetHeight() const
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.