Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TImageDump.cxx
Go to the documentation of this file.
1// @(#)root/postscript:$Id$
2// Author: Valeriy Onuchin
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TImageDump
13\ingroup PS
14
15\brief Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
16
17Example:
18~~~ {.cpp}
19 $ root -b
20 root [0] .x hsimple.C
21 root [1] c1->Print("c1.gif");
22~~~
23TImageDump can be used in any mode (batch, interactive) as follows
24~~~ {.cpp}
25 TCanvas *c1;
26 TImageDump *imgdump = new TImageDump("test.png");
27 c1->Paint();
28 imgdump->Close();
29~~~
30*/
31
32#include "TImageDump.h"
33#include "TImage.h"
34#include "TMath.h"
35#include "TPoint.h"
36#include "TColor.h"
37#include "TVirtualPad.h"
38#include "TVirtualX.h"
39#include "TROOT.h"
40#include "TText.h"
41#include "RStipples.h"
42#include "TList.h"
43#include "TStyle.h"
44#include "TObjString.h"
45#include "TObjArray.h"
46
47
48
49////////////////////////////////////////////////////////////////////////////////
50/// Default constructor
51
53{
54 gVirtualPS = this;
55 SetTitle("IMG");
56}
57
58////////////////////////////////////////////////////////////////////////////////
59/// Initialize batch image interface
60///
61/// fname : image file name
62///
63/// The possible workstation types are:
64/// - 111 - Portrait
65/// - 112 - Landscape
66/// - 114 - preview, keep in memory (do not write on delete)
67
68TImageDump::TImageDump(const char *fname, Int_t wtype) : TVirtualPS(fname, wtype)
69{
70 Open(fname, wtype);
71 gVirtualPS = this;
72 SetTitle("IMG");
73}
74
75////////////////////////////////////////////////////////////////////////////////
76/// Open a image file
77
78void TImageDump::Open(const char *fname, Int_t type)
79{
81 fType = type;
82 SetName(fname);
83}
84
85////////////////////////////////////////////////////////////////////////////////
86/// destructor
87
89{
90 Close();
91
92 delete fImage;
93 fImage = nullptr;
94
95 gVirtualPS = nullptr;
96}
97
98////////////////////////////////////////////////////////////////////////////////
99/// Close a image file
100
102{
103 // if fType == 114 - do not write image
104 if (!fImage || (fType == 114)) {
105 return;
106 }
107
108 //if (fType == 112) fImage->Flip(90);
109 fImage->WriteImage(GetName());
110}
111
112////////////////////////////////////////////////////////////////////////////////
113/// Draw a Box
114
116{
117 if (!gPad || !fImage)
118 return;
119
120 fImage->BeginPaint();
121
122 Double_t x[4], y[4];
123 Int_t ix1 = x1 < x2 ? XtoPixel(x1) : XtoPixel(x2);
124 Int_t ix2 = x1 < x2 ? XtoPixel(x2) : XtoPixel(x1);
125 Int_t iy1 = y1 < y2 ? YtoPixel(y1) : YtoPixel(y2);
126 Int_t iy2 = y1 < y2 ? YtoPixel(y2) : YtoPixel(y1);
127
128 if (ix1<0 || ix2 <0 || iy1 < 0 || iy2 <0) return; // box is not visible
129
130 if (TMath::Abs(ix2-ix1) < 1) ix2 = ix1+1;
131 if (TMath::Abs(iy1-iy2) < 1) iy1 = iy2+1;
132
133 Int_t fillis = fFillStyle/1000;
134 Int_t fillsi = fFillStyle%1000;
135
136 TColor *col = gROOT->GetColor(fFillColor);
137 if (!col) { // no color, set it white
138 fFillColor = 10;
139 col = gROOT->GetColor(fFillColor);
140 if (!col) return;
141 }
142
143 TColor *linecol = gROOT->GetColor(fLineColor);
144 if (!linecol) { // no color, set it to black
145 fLineColor = 1;
146 linecol = gROOT->GetColor(fLineColor);
147 }
148
149 if ((fillis == 3) || (fillis == 2)) {
150 if (fillsi > 99) {
151 x[0] = x1; y[0] = y1;
152 x[1] = x2; y[1] = y1;
153 x[2] = x2; y[2] = y2;
154 x[3] = x1; y[3] = y2;
155 return;
156 }
157 if ((fillsi > 0) && (fillsi < 26)) {
158 x[0] = x1; y[0] = y1;
159 x[1] = x2; y[1] = y1;
160 x[2] = x2; y[2] = y2;
161 x[3] = x1; y[3] = y2;
162 DrawPS(-4, &x[0], &y[0]);
163 }
164 if (fillsi == -3) {
165 // fill style = -3 ... which is NEVER used now
166 }
167 }
168
169 if (fillis == 1) {
170 fImage->DrawBox(ix1, iy1, ix2, iy2, col->AsHexString(), 1, TVirtualX::kFilled);
171 }
172
173 if (fillis == 0) {
174 if (fLineWidth<=0) return;
175 fImage->DrawBox(ix1, iy1, ix2, iy2, linecol->AsHexString(), fLineWidth, TVirtualX::kHollow);
176 }
177}
178
179////////////////////////////////////////////////////////////////////////////////
180/// Draw a Frame around a box
181///
182/// - mode = -1 the box looks as it is behind the screen
183/// - mode = 1 the box looks as it is in front of the screen
184/// border is the border size in already pre-computed dark is the
185/// color for the dark part of the frame light is the color for the light
186/// part of the frame
187
189 Int_t mode, Int_t bordersize, Int_t dark, Int_t light)
190{
191 if (!gPad || !fImage) {
192 return;
193 }
194
195 fImage->BeginPaint();
196
197 bordersize = bordersize < 1 ? 1 : bordersize;
198
199 TColor *col;
200 TColor *lo = gROOT->GetColor(dark);
201 if (!lo) {
202 lo = gROOT->GetColor(10);
203 }
204 TColor *hi = gROOT->GetColor(light);
205 if (!hi) {
206 hi = gROOT->GetColor(10);
207 }
208
209 Short_t pxl,pyl,pxt,pyt,px1,py1,px2,py2;
210
211 px1 = XtoPixel(x1); py1 = YtoPixel(y1);
212 px2 = XtoPixel(x2); py2 = YtoPixel(y2);
213 if (px1 < px2) {pxl = px1; pxt = px2;}
214 else {pxl = px2; pxt = px1;}
215 if (py1 > py2) {pyl = py1; pyt = py2;}
216 else {pyl = py2; pyt = py1;}
217
218 if (bordersize == 1) {
219 col = gROOT->GetColor(fLineColor);
220 if (!col) {
221 fLineColor = 1;
222 col = gROOT->GetColor(fLineColor);
223 if (!col) return;
224 }
225 fImage->DrawBox(pxl, pyl, pxt, pyt-1, col->AsHexString(), TVirtualX::kFilled);
226 return;
227 }
228
229 if (!fImage->IsValid()) {
230 col = gROOT->GetColor(light);
231 if (!col) {
232 col = gROOT->GetColor(10);
233 if (!col) return;
234 }
235 fImage->DrawBox(pxl, pyl, pxt, pyt, // force image creation and resizing
236 "#ffffffff", 1, TVirtualX::kFilled);
237 }
238
239 TPoint frame[6];
240
241 frame[0].fX = pxl; frame[0].fY = pyl;
242 frame[1].fX = pxl + bordersize; frame[1].fY = pyl - bordersize;
243 frame[2].fX = pxl + bordersize; frame[2].fY = pyt + bordersize;
244 frame[3].fX = pxt - bordersize; frame[3].fY = pyt + bordersize;
245 frame[4].fX = pxt; frame[4].fY = pyt;
246 frame[5].fX = pxl; frame[5].fY = pyt;
247
248 if (mode == -1) col = lo;
249 else col = hi;
250
251 fImage->DrawFillArea(6, frame, col->AsHexString());
252
253 frame[0].fX = pxl; frame[0].fY = pyl;
254 frame[1].fX = pxl + bordersize; frame[1].fY = pyl - bordersize;
255 frame[2].fX = pxt - bordersize; frame[2].fY = frame[1].fY;
256 frame[3].fX = frame[2].fX; frame[3].fY = pyt + bordersize;
257 frame[4].fX = pxt; frame[4].fY = pyt;
258 frame[5].fX = pxt; frame[5].fY = pyl;
259
260 if (mode == -1) col = hi;
261 else col = lo;
262
263 fImage->DrawFillArea(6, frame, col->AsHexString());
264}
265
266////////////////////////////////////////////////////////////////////////////////
267/// not used
268
270{
271 if (!gPad || !fImage) {
272 return;
273 }
274}
275
276////////////////////////////////////////////////////////////////////////////////
277/// draw polymarker
278
280{
281 if (!gPad || !fImage)
282 return;
283
284 fImage->BeginPaint();
285
288 TPoint pt[20];
289
290 if (ms == 4)
291 ms = 24;
292 else if (ms == 8)
293 ms = 20;
294 else if (ms >= 9 && ms <= 19)
295 ms = 1;
296
297 // Define the marker size
298 const Int_t kBASEMARKER = 8;
299 Double_t msize = (fMarkerSize - TMath::Floor(TAttMarker::GetMarkerLineWidth(fMarkerStyle)/2.)/4.) * kBASEMARKER * gStyle->GetImageScaling();
300 if (ms == 6) msize *= 0.2;
301 if (ms == 7) msize *= 0.3;
302 Double_t m = msize;
303 Double_t m2 = m/2;
304 Double_t m3 = m/3;
305 Double_t m6 = m/6;
306 Double_t m4 = m/4;
307 Double_t m8 = m/8;
308 Double_t m0 = m*0.1;
309
310 TColor *col = gROOT->GetColor(fMarkerColor);
311 if (!col) { // no color
312 fMarkerColor = 1;
313 col = gROOT->GetColor(fMarkerColor);
314 if (!col) return;
315 }
316 if (col->GetAlpha()<1.) {
317 if (ms==8) ms = 108;
318 if (ms==20) ms = 120;
319 }
320
322
323 // Draw the marker according to the type
324 Short_t ix,iy;
325 for (Int_t i=0;i<n;i++) {
326 ix = XtoPixel(xw[i]);
327 iy = YtoPixel(yw[i]);
328
329 switch (ms) {
330 // Dots (.) big, medium and small
331 case 7:
332 fImage->PutPixel((UInt_t)ix-1, (UInt_t)iy-1, col->AsHexString());
333 fImage->PutPixel((UInt_t)ix-1, (UInt_t)iy+1, col->AsHexString());
334 fImage->PutPixel((UInt_t)ix+1, (UInt_t)iy+1, col->AsHexString());
335 fImage->PutPixel((UInt_t)ix+1, (UInt_t)iy-1, col->AsHexString());
336 case 6:
337 fImage->PutPixel((UInt_t)ix, (UInt_t)iy-1, col->AsHexString());
338 fImage->PutPixel((UInt_t)ix, (UInt_t)iy+1, col->AsHexString());
339 fImage->PutPixel((UInt_t)ix-1, (UInt_t)iy, col->AsHexString());
340 fImage->PutPixel((UInt_t)ix+1, (UInt_t)iy, col->AsHexString());
341 case 1:
342 fImage->PutPixel((UInt_t)ix, (UInt_t)iy, col->AsHexString());
343 break;
344 // Plus (+)
345 case 2:
346 fImage->DrawLine(UInt_t(ix-m2), UInt_t(iy), UInt_t(ix+m2), UInt_t(iy), col->AsHexString(), mlinewidth);
347 fImage->DrawLine(UInt_t(ix), UInt_t(iy-m2), UInt_t(ix), UInt_t(iy+m2), col->AsHexString(), mlinewidth);
348 break;
349 // X shape (X)
350 case 5:
351 fImage->DrawLine(UInt_t(ix-m2*0.707), UInt_t(iy-m2*0.707), UInt_t(ix+m2*0.707), UInt_t(iy+m2*0.707), col->AsHexString(), mlinewidth);
352 fImage->DrawLine(UInt_t(ix-m2*0.707), UInt_t(iy+m2*0.707), UInt_t(ix+m2*0.707), UInt_t(iy-m2*0.707), col->AsHexString(), mlinewidth);
353 break;
354 // Asterisk shape (*)
355 case 3:
356 case 31:
357 fImage->DrawLine(UInt_t(ix-m2), UInt_t(iy), UInt_t(ix+m2), UInt_t(iy), col->AsHexString(), mlinewidth);
358 fImage->DrawLine(UInt_t(ix), UInt_t(iy-m2), UInt_t(ix), UInt_t(iy+m2), col->AsHexString(), mlinewidth);
359 fImage->DrawLine(UInt_t(ix-m2*0.707), UInt_t(iy-m2*0.707), UInt_t(ix+m2*0.707), UInt_t(iy+m2*0.707), col->AsHexString(), mlinewidth);
360 fImage->DrawLine(UInt_t(ix-m2*0.707), UInt_t(iy+m2*0.707), UInt_t(ix+m2*0.707), UInt_t(iy-m2*0.707), col->AsHexString(), mlinewidth);
361 break;
362 // Circle
363 case 4:
364 case 24:
365 fImage->DrawCircle(ix, iy, Int_t(msize/2), col->AsHexString(), mlinewidth);
366 break;
367 // Circle
368 case 8:
369 case 20:
370 fImage->DrawCircle(ix, iy, Int_t(msize/2), col->AsHexString(), -1);
371 break;
372 case 108:
373 case 120:
374 for (int idx=Int_t(msize/2); idx>0; idx--) fImage->DrawCircle(ix, iy, idx, col->AsHexString(), 1);
375 fImage->PutPixel((UInt_t)ix, (UInt_t)iy, col->AsHexString());
376 break;
377 // Square
378 case 21:
379 fImage->FillRectangle(col->AsHexString(), UInt_t(ix-m2), UInt_t(iy-m2), UInt_t(m), UInt_t(m));
380 break;
381 case 25:
382 fImage->DrawRectangle(UInt_t(ix-m2), UInt_t(iy-m2), UInt_t(m), UInt_t(m), col->AsHexString(), mlinewidth);
383 break;
384 // Down triangle
385 case 23:
386 case 32:
387 pt[0].fX = Short_t(ix-m2); pt[0].fY = Short_t(iy-m2);
388 pt[1].fX = Short_t(ix+m2); pt[1].fY = Short_t(iy-m2);
389 pt[2].fX = Short_t(ix); pt[2].fY = Short_t(iy+m2);
390 pt[3].fX = Short_t(ix-m2); pt[3].fY = Short_t(iy-m2);
391 ms == 32 ? fImage->DrawPolyLine(4, pt, col->AsHexString(), mlinewidth) :
392 fImage->FillPolygon(3, pt, col->AsHexString());
393 break;
394 // Up triangle
395 case 22:
396 case 26:
397 pt[0].fX = Short_t(ix); pt[0].fY = Short_t(iy-m2);
398 pt[1].fX = Short_t(ix+m2); pt[1].fY = Short_t(iy+m2);
399 pt[2].fX = Short_t(ix-m2); pt[2].fY = Short_t(iy+m2);
400 pt[3].fX = Short_t(ix); pt[3].fY = Short_t(iy-m2);
401 ms == 26 ? fImage->DrawPolyLine(4, pt, col->AsHexString(), mlinewidth) :
402 fImage->FillPolygon(3, pt, col->AsHexString());
403 break;
404 case 27:
405 case 33:
406 pt[0].fX = Short_t(ix); pt[0].fY = Short_t(iy-m2);
407 pt[1].fX = Short_t(ix+m3); pt[1].fY = Short_t(iy);
408 pt[2].fX = Short_t(ix); pt[2].fY = Short_t(iy+m2);
409 pt[3].fX = Short_t(ix-m3); pt[3].fY = Short_t(iy);
410 pt[4].fX = Short_t(ix); pt[4].fY = Short_t(iy-m2);
411 ms == 27 ? fImage->DrawPolyLine(5, pt, col->AsHexString(), mlinewidth) :
412 fImage->FillPolygon(4, pt, col->AsHexString());
413 break;
414 case 28:
415 case 34:
416 pt[0].fX = Short_t(ix-m6); pt[0].fY = Short_t(iy-m6);
417 pt[1].fX = Short_t(ix-m6); pt[1].fY = Short_t(iy-m2);
418 pt[2].fX = Short_t(ix+m6); pt[2].fY = Short_t(iy-m2);
419 pt[3].fX = Short_t(ix+m6); pt[3].fY = Short_t(iy-m6);
420 pt[4].fX = Short_t(ix+m2); pt[4].fY = Short_t(iy-m6);
421 pt[5].fX = Short_t(ix+m2); pt[5].fY = Short_t(iy+m6);
422 pt[6].fX = Short_t(ix+m6); pt[6].fY = Short_t(iy+m6);
423 pt[7].fX = Short_t(ix+m6); pt[7].fY = Short_t(iy+m2);
424 pt[8].fX = Short_t(ix-m6); pt[8].fY = Short_t(iy+m2);
425 pt[9].fX = Short_t(ix-m6); pt[9].fY = Short_t(iy+m6);
426 pt[10].fX = Short_t(ix-m2); pt[10].fY = Short_t(iy+m6);
427 pt[11].fX = Short_t(ix-m2); pt[11].fY = Short_t(iy-m6);
428 pt[12].fX = Short_t(ix-m6); pt[12].fY = Short_t(iy-m6);
429 ms == 28 ? fImage->DrawPolyLine(13, pt, col->AsHexString(), mlinewidth) :
430 fImage->FillPolygon(12, pt, col->AsHexString());
431 break;
432 case 29:
433 case 30:
434 pt[0].fX = Short_t(ix); pt[0].fY = Short_t(iy+m2);
435 pt[1].fX = Short_t(ix+0.112255*m); pt[1].fY = Short_t(iy+0.15451*m);
436 pt[2].fX = Short_t(ix+0.47552*m); pt[2].fY = Short_t(iy+0.15451*m);
437 pt[3].fX = Short_t(ix+0.181635*m); pt[3].fY = Short_t(iy-0.05902*m);
438 pt[4].fX = Short_t(ix+0.29389*m); pt[4].fY = Short_t(iy-0.40451*m);
439 pt[5].fX = Short_t(ix); pt[5].fY = Short_t(iy-0.19098*m);
440 pt[6].fX = Short_t(ix-0.29389*m); pt[6].fY = Short_t(iy-0.40451*m);
441 pt[7].fX = Short_t(ix-0.181635*m); pt[7].fY = Short_t(iy-0.05902*m);
442 pt[8].fX = Short_t(ix-0.47552*m); pt[8].fY = Short_t(iy+0.15451*m);
443 pt[9].fX = Short_t(ix-0.112255*m); pt[9].fY = Short_t(iy+0.15451*m);
444 pt[10].fX = Short_t(ix); pt[10].fY = Short_t(iy+m2);
445 ms == 30 ? fImage->DrawPolyLine(11, pt, col->AsHexString(), mlinewidth) :
446 fImage->DrawFillArea(10, pt, col->AsHexString());
447 break;
448 case 35:
449 pt[0].fX = Short_t(ix-m2); pt[0].fY = Short_t(iy );
450 pt[1].fX = Short_t(ix ); pt[1].fY = Short_t(iy-m2);
451 pt[2].fX = Short_t(ix+m2); pt[2].fY = Short_t(iy );
452 pt[3].fX = Short_t(ix ); pt[3].fY = Short_t(iy+m2);
453 pt[4].fX = Short_t(ix-m2); pt[4].fY = Short_t(iy );
454 pt[5].fX = Short_t(ix+m2); pt[5].fY = Short_t(iy );
455 pt[6].fX = Short_t(ix ); pt[6].fY = Short_t(iy+m2);
456 pt[7].fX = Short_t(ix ); pt[7].fY = Short_t(iy-m2);
457 fImage->DrawPolyLine(8, pt, col->AsHexString(), mlinewidth) ;
458 break;
459 case 36:
460 pt[0].fX = Short_t(ix-m2); pt[0].fY = Short_t(iy-m2);
461 pt[1].fX = Short_t(ix+m2); pt[1].fY = Short_t(iy-m2);
462 pt[2].fX = Short_t(ix+m2); pt[2].fY = Short_t(iy+m2);
463 pt[3].fX = Short_t(ix-m2); pt[3].fY = Short_t(iy+m2);
464 pt[4].fX = Short_t(ix-m2); pt[4].fY = Short_t(iy-m2);
465 pt[5].fX = Short_t(ix+m2); pt[5].fY = Short_t(iy+m2);
466 pt[6].fX = Short_t(ix-m2); pt[6].fY = Short_t(iy+m2);
467 pt[7].fX = Short_t(ix+m2); pt[7].fY = Short_t(iy-m2);
468 fImage->DrawPolyLine(8, pt, col->AsHexString(), mlinewidth) ;
469 break;
470 case 37:
471 case 39:
472 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy );
473 pt[1].fX = Short_t(ix-m4); pt[1].fY = Short_t(iy-m2);
474 pt[2].fX = Short_t(ix-m2); pt[2].fY = Short_t(iy );
475 pt[3].fX = Short_t(ix+m2); pt[3].fY = Short_t(iy );
476 pt[4].fX = Short_t(ix+m4); pt[4].fY = Short_t(iy-m2);
477 pt[5].fX = Short_t(ix-m4); pt[5].fY = Short_t(iy+m2);
478 pt[6].fX = Short_t(ix+m4); pt[6].fY = Short_t(iy+m2);
479 pt[7].fX = Short_t(ix ); pt[7].fY = Short_t(iy );
480 ms == 37 ? fImage->DrawPolyLine(8, pt, col->AsHexString(), mlinewidth) :
481 fImage->DrawFillArea(7, pt, col->AsHexString());
482 break;
483 case 38:
484 pt[0].fX = Short_t(ix-m2); pt[0].fY = Short_t(iy );
485 pt[1].fX = Short_t(ix-m2); pt[1].fY = Short_t(iy-m4);
486 pt[2].fX = Short_t(ix-m4); pt[2].fY = Short_t(iy-m2);
487 pt[3].fX = Short_t(ix+m4); pt[3].fY = Short_t(iy-m2);
488 pt[4].fX = Short_t(ix+m2); pt[4].fY = Short_t(iy-m4);
489 pt[5].fX = Short_t(ix+m2); pt[5].fY = Short_t(iy+m4);
490 pt[6].fX = Short_t(ix+m4); pt[6].fY = Short_t(iy+m2);
491 pt[7].fX = Short_t(ix-m4); pt[7].fY = Short_t(iy+m2);
492 pt[8].fX = Short_t(ix-m2); pt[8].fY = Short_t(iy+m4);
493 pt[9].fX = Short_t(ix-m2); pt[9].fY = Short_t(iy );
494 pt[10].fX = Short_t(ix+m2); pt[10].fY = Short_t(iy );
495 pt[11].fX = Short_t(ix ); pt[11].fY = Short_t(iy );
496 pt[12].fX = Short_t(ix ); pt[12].fY = Short_t(iy-m2);
497 pt[13].fX = Short_t(ix ); pt[13].fY = Short_t(iy+m2);
498 pt[14].fX = Short_t(ix ); pt[14].fY = Short_t(iy );
499 fImage->DrawPolyLine(15, pt, col->AsHexString(), mlinewidth) ;
500 break;
501 case 40:
502 case 41:
503 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy );
504 pt[1].fX = Short_t(ix+m4); pt[1].fY = Short_t(iy+m2);
505 pt[2].fX = Short_t(ix+m2); pt[2].fY = Short_t(iy+m4);
506 pt[3].fX = Short_t(ix ); pt[3].fY = Short_t(iy );
507 pt[4].fX = Short_t(ix+m2); pt[4].fY = Short_t(iy-m4);
508 pt[5].fX = Short_t(ix+m4); pt[5].fY = Short_t(iy-m2);
509 pt[6].fX = Short_t(ix ); pt[6].fY = Short_t(iy );
510 pt[7].fX = Short_t(ix-m4); pt[7].fY = Short_t(iy-m2);
511 pt[8].fX = Short_t(ix-m2); pt[8].fY = Short_t(iy-m4);
512 pt[9].fX = Short_t(ix ); pt[9].fY = Short_t(iy );
513 pt[10].fX = Short_t(ix-m2); pt[10].fY = Short_t(iy+m4);
514 pt[11].fX = Short_t(ix-m4); pt[11].fY = Short_t(iy+m2);
515 pt[12].fX = Short_t(ix ); pt[12].fY = Short_t(iy );
516 ms == 40 ? fImage->DrawPolyLine(13, pt, col->AsHexString(), mlinewidth) :
517 fImage->DrawFillArea(12, pt, col->AsHexString());
518 break;
519 case 42:
520 case 43:
521 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy+m2);
522 pt[1].fX = Short_t(ix-m8); pt[1].fY = Short_t(iy+m8);
523 pt[2].fX = Short_t(ix-m2); pt[2].fY = Short_t(iy );
524 pt[3].fX = Short_t(ix-m8); pt[3].fY = Short_t(iy-m8);
525 pt[4].fX = Short_t(ix ); pt[4].fY = Short_t(iy-m2);
526 pt[5].fX = Short_t(ix+m8); pt[5].fY = Short_t(iy-m8);
527 pt[6].fX = Short_t(ix+m2); pt[6].fY = Short_t(iy );
528 pt[7].fX = Short_t(ix+m8); pt[7].fY = Short_t(iy+m8);
529 pt[8].fX = Short_t(ix ); pt[8].fY = Short_t(iy+m2);
530 ms == 42 ? fImage->DrawPolyLine(9, pt, col->AsHexString(), mlinewidth) :
531 fImage->DrawFillArea(8, pt, col->AsHexString());
532 break;
533 case 44:
534 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy );
535 pt[1].fX = Short_t(ix+m4); pt[1].fY = Short_t(iy+m2);
536 pt[2].fX = Short_t(ix-m4); pt[2].fY = Short_t(iy+m2);
537 pt[3].fX = Short_t(ix+m4); pt[3].fY = Short_t(iy-m2);
538 pt[4].fX = Short_t(ix-m4); pt[4].fY = Short_t(iy-m2);
539 pt[5].fX = Short_t(ix ); pt[5].fY = Short_t(iy );
540 pt[6].fX = Short_t(ix+m2); pt[6].fY = Short_t(iy+m4);
541 pt[7].fX = Short_t(ix+m2); pt[7].fY = Short_t(iy-m4);
542 pt[8].fX = Short_t(ix-m2); pt[8].fY = Short_t(iy+m4);
543 pt[9].fX = Short_t(ix-m2); pt[9].fY = Short_t(iy-m4);
544 pt[10].fX = Short_t(ix ); pt[10].fY = Short_t(iy );
545 fImage->DrawPolyLine(11, pt, col->AsHexString(), mlinewidth) ;
546 break;
547 case 45:
548 pt[0].fX = Short_t(ix+m0); pt[0].fY = Short_t(iy+m0);
549 pt[1].fX = Short_t(ix+m4); pt[1].fY = Short_t(iy+m2);
550 pt[2].fX = Short_t(ix-m4); pt[2].fY = Short_t(iy+m2);
551 pt[3].fX = Short_t(ix-m0); pt[3].fY = Short_t(iy+m0);
552 pt[4].fX = Short_t(ix-m2); pt[4].fY = Short_t(iy+m4);
553 pt[5].fX = Short_t(ix-m2); pt[5].fY = Short_t(iy-m4);
554 pt[6].fX = Short_t(ix-m0); pt[6].fY = Short_t(iy-m0);
555 pt[7].fX = Short_t(ix-m4); pt[7].fY = Short_t(iy-m2);
556 pt[8].fX = Short_t(ix+m4); pt[8].fY = Short_t(iy-m2);
557 pt[9].fX = Short_t(ix+m0); pt[9].fY = Short_t(iy-m0);
558 pt[10].fX = Short_t(ix+m2); pt[10].fY = Short_t(iy-m4);
559 pt[11].fX = Short_t(ix+m2); pt[11].fY = Short_t(iy+m4);
560 pt[12].fX = Short_t(ix+m0); pt[12].fY = Short_t(iy+m0);
561 fImage->DrawFillArea(13, pt, col->AsHexString());
562 break;
563 case 46:
564 case 47:
565 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy+m4);
566 pt[1].fX = Short_t(ix-m4); pt[1].fY = Short_t(iy+m2);
567 pt[2].fX = Short_t(ix-m2); pt[2].fY = Short_t(iy+m4);
568 pt[3].fX = Short_t(ix-m4); pt[3].fY = Short_t(iy );
569 pt[4].fX = Short_t(ix-m2); pt[4].fY = Short_t(iy-m4);
570 pt[5].fX = Short_t(ix-m4); pt[5].fY = Short_t(iy-m2);
571 pt[6].fX = Short_t(ix ); pt[6].fY = Short_t(iy-m4);
572 pt[7].fX = Short_t(ix+m4); pt[7].fY = Short_t(iy-m2);
573 pt[8].fX = Short_t(ix+m2); pt[8].fY = Short_t(iy-m4);
574 pt[9].fX = Short_t(ix+m4); pt[9].fY = Short_t(iy );
575 pt[10].fX = Short_t(ix+m2); pt[10].fY = Short_t(iy+m4);
576 pt[11].fX = Short_t(ix+m4); pt[11].fY = Short_t(iy+m2);
577 pt[12].fX = Short_t(ix ); pt[12].fY = Short_t(iy+m4);
578 ms == 46 ? fImage->DrawPolyLine(13, pt, col->AsHexString(), mlinewidth) :
579 fImage->DrawFillArea(12, pt, col->AsHexString());
580 break;
581 case 48:
582 pt[0].fX = Short_t(ix ); pt[0].fY = Short_t(iy+m4*1.005);
583 pt[1].fX = Short_t(ix-m4); pt[1].fY = Short_t(iy+m2);
584 pt[2].fX = Short_t(ix-m2); pt[2].fY = Short_t(iy+m4);
585 pt[3].fX = Short_t(ix-m4); pt[3].fY = Short_t(iy );
586 pt[4].fX = Short_t(ix-m2); pt[4].fY = Short_t(iy-m4);
587 pt[5].fX = Short_t(ix-m4); pt[5].fY = Short_t(iy-m2);
588 pt[6].fX = Short_t(ix ); pt[6].fY = Short_t(iy-m4);
589 pt[7].fX = Short_t(ix+m4); pt[7].fY = Short_t(iy-m2);
590 pt[8].fX = Short_t(ix+m2); pt[8].fY = Short_t(iy-m4);
591 pt[9].fX = Short_t(ix+m4); pt[9].fY = Short_t(iy );
592 pt[10].fX = Short_t(ix+m2); pt[10].fY = Short_t(iy+m4);
593 pt[11].fX = Short_t(ix+m4); pt[11].fY = Short_t(iy+m2);
594 pt[12].fX = Short_t(ix ); pt[12].fY = Short_t(iy+m4*0.995);
595 pt[13].fX = Short_t(ix+m4*0.995); pt[13].fY = Short_t(iy );
596 pt[14].fX = Short_t(ix ); pt[14].fY = Short_t(iy-m4*0.995);
597 pt[15].fX = Short_t(ix-m4*0.995); pt[15].fY = Short_t(iy );
598 pt[16].fX = Short_t(ix ); pt[16].fY = Short_t(iy+m4*0.995);
599 fImage->DrawFillArea(17, pt, col->AsHexString());
600 break;
601 case 49:
602 pt[0].fX = Short_t(ix-m6); pt[0].fY = Short_t(iy-m6*1.005);
603 pt[1].fX = Short_t(ix-m6); pt[1].fY = Short_t(iy-m2);
604 pt[2].fX = Short_t(ix+m6); pt[2].fY = Short_t(iy-m2);
605 pt[3].fX = Short_t(ix+m6); pt[3].fY = Short_t(iy-m6);
606 pt[4].fX = Short_t(ix+m2); pt[4].fY = Short_t(iy-m6);
607 pt[5].fX = Short_t(ix+m2); pt[5].fY = Short_t(iy+m6);
608 pt[6].fX = Short_t(ix+m6); pt[6].fY = Short_t(iy+m6);
609 pt[7].fX = Short_t(ix+m6); pt[7].fY = Short_t(iy+m2);
610 pt[8].fX = Short_t(ix-m6); pt[8].fY = Short_t(iy+m2);
611 pt[9].fX = Short_t(ix-m6); pt[9].fY = Short_t(iy+m6);
612 pt[10].fX = Short_t(ix-m2); pt[10].fY = Short_t(iy+m6);
613 pt[11].fX = Short_t(ix-m2); pt[11].fY = Short_t(iy-m6);
614 pt[12].fX = Short_t(ix-m6); pt[12].fY = Short_t(iy-m6*0.995);
615 pt[13].fX = Short_t(ix-m6); pt[13].fY = Short_t(iy+m6);
616 pt[14].fX = Short_t(ix+m6); pt[14].fY = Short_t(iy+m6);
617 pt[15].fX = Short_t(ix+m6); pt[15].fY = Short_t(iy-m6);
618 pt[16].fX = Short_t(ix-m6); pt[16].fY = Short_t(iy-m6*1.005);
619 fImage->DrawFillArea(17, pt, col->AsHexString());
620 break;
621 default:
622 fImage->PutPixel(UInt_t(ix), UInt_t(iy), col->AsHexString());
623 break;
624 }
625 }
626}
627
628////////////////////////////////////////////////////////////////////////////////
629/// This function defines a path with xw and yw and draw it according the
630/// value of nn:
631///
632/// - If nn > 0 a line is drawn.
633/// - If nn < 0 a closed polygon is drawn.
634
636{
637 if (!gPad || !fImage || !nn)
638 return;
639
640 fImage->BeginPaint();
641
642 Bool_t line = nn > 1;
643 UInt_t n = TMath::Abs(nn);
644 Int_t fais = fFillStyle / 1000;
645 Int_t fasi = fFillStyle % 1000;
646
647 // SetLineStyle
648 std::vector<char> dashList;
649
650 TColor *fcol = gROOT->GetColor(fFillColor);
651 if (!fcol) { // no color, set it white
652 fFillColor = 10;
653 fcol = gROOT->GetColor(fFillColor);
654 }
655
656 TColor *lcol = gROOT->GetColor(fLineColor);
657 if (!lcol) { // no color, make it black
658 fLineColor = 1;
659 lcol = gROOT->GetColor(fLineColor);
660 }
661
662 if (line) {
663 if (fLineWidth <= 0)
664 return;
665 // dash lines
666 if (fLineStyle > 1) {
667 TString st = gStyle->GetLineStyleString(fLineStyle);
668 std::unique_ptr<TObjArray> tokens(st.Tokenize(" "));
669
670 if (tokens)
671 for (int j = 0; j < tokens->GetEntries(); j++) {
672 Int_t it;
673 sscanf(tokens->At(j)->GetName(), "%d", &it);
674 dashList.emplace_back((char)(it/4));
675 }
676 }
677 }
678
679 if (n == 1) { // point
680 auto px1 = XtoPixel(x[0]);
681 auto py1 = YtoPixel(y[0]);
682 if (fcol)
683 fImage->PutPixel(px1, py1, fcol->AsHexString());
684 return;
685 }
686
687 if (n == 2) { // line
688 auto px1 = XtoPixel(x[0]);
689 auto py1 = YtoPixel(y[0]);
690 auto px2 = XtoPixel(x[1]);
691 auto py2 = YtoPixel(y[1]);
692
693 // SetLineColor
694 if (lcol) {
695 if (fLineStyle < 2) {
696 fImage->DrawLine(px1, py1, px2, py2, lcol->AsHexString(), fLineWidth);
697 } else {
698 fImage->DrawDashLine(px1, py1, px2, py2, dashList.size(), dashList.data(),
699 lcol->AsHexString(), fLineWidth);
700 }
701 }
702 return;
703 }
704
705 if (!line && ((fais == 3) || (fais == 2)) && (fasi > 100))
706 return;
707
708 std::vector<TPoint> pt(n+1);
709
710 for (UInt_t i = 0; i < n; i++) {
711 pt[i].fX = XtoPixel(x[i]);
712 pt[i].fY = YtoPixel(y[i]);
713 }
714 pt[n].fX = pt[0].fX;
715 pt[n].fY = pt[0].fY;
716
717 const char *stipple = (fais == 3) && (fasi > 0) && (fasi < 26) ? (const char*)gStipples[fasi] : nullptr;
718
719 // filled polygon
720 if (!line && fFillStyle && (fFillStyle != 4000) && fcol) {
721 if (n < 5) // convex
722 fImage->FillPolygon(n, pt.data(), fcol->AsHexString(), stipple);
723 else // non-convex fill area
724 fImage->DrawFillArea(n, pt.data(), fcol->AsHexString(), stipple);
725 }
726
727 // hollow polygon or polyline is drawn
728 if (line || !fFillStyle || (fFillStyle == 4000)) {
729 if (!line) {
730 if (fcol)
731 fImage->DrawPolyLine(n+1, pt.data(), fcol->AsHexString(), 1);
732 } else if (lcol) {
733 if (fLineStyle < 2) { // solid
734 fImage->DrawPolyLine(n, pt.data(), lcol->AsHexString(), fLineWidth);
735 } else { // dashed
736 DrawDashPolyLine(n, pt.data(), dashList.size(), dashList.data(),
737 lcol->AsHexString(), fLineWidth);
738 }
739 }
740 }
741}
742
743////////////////////////////////////////////////////////////////////////////////
744/// not used
745
747{
748 if (!gPad || !fImage) {
749 return;
750 }
751}
752
753////////////////////////////////////////////////////////////////////////////////
754/// draw dashed polyline
755
757 const char* pDash, const char* col, UInt_t thick)
758{
759 Int_t x0 = xy[0].GetX();
760 Int_t y0 = xy[0].GetY();
761
762 for (Int_t i = 1; i < nn; i++) {
763 Int_t x = xy[i].GetX();
764 Int_t y = xy[i].GetY();
765
766 fImage->DrawDashLine(x0, y0, x, y, nDash, pDash, col, thick);
767
768 x0 = x;
769 y0 = y;
770 }
771}
772
773////////////////////////////////////////////////////////////////////////////////
774/// new page
775
777{
778 fX0 = fY0 = 0;
779 if (gPad && fImage) {
780 UInt_t w = gPad->GetWw() * gStyle->GetImageScaling();
781 UInt_t h = gPad->GetWh() * gStyle->GetImageScaling();
782 if (gPad != gPad->GetMother()) {
783 fX0 = gPad->XtoAbsPixel(gPad->GetX1())* gStyle->GetImageScaling();
784 fY0 = gPad->YtoAbsPixel(gPad->GetY2())* gStyle->GetImageScaling();
785 w = w * gPad->GetAbsWNDC();
786 h = h * gPad->GetAbsHNDC();
787 }
788 fImage->DrawRectangle(0, 0, w, h, "#ffffffff");
789 }
790}
791
792////////////////////////////////////////////////////////////////////////////////
793/// Draw text
794///
795/// - x: x position of the text
796/// - y: y position of the text
797
798void TImageDump::Text(Double_t x, Double_t y, const char *chars)
799{
800 if (!gPad || !fImage)
801 return;
802
803 fImage->BeginPaint();
804
805 TText t(x, y, chars);
806 t.SetTextSize(fTextSize*gStyle->GetImageScaling());
811 fImage->DrawTextOnPad(&t, XtoPixel(x), YtoPixel(y), gPad, fX0, fY0);
812}
813
814////////////////////////////////////////////////////////////////////////////////
815/// Draw text
816///
817/// - x: x position of the text
818/// - y: y position of the text
819
820void TImageDump::Text(Double_t x, Double_t y, const wchar_t *chars)
821{
822 if (!gPad || !fImage)
823 return;
824
825 fImage->BeginPaint();
826
827 TText t(x, y, chars);
828 t.SetTextSize(fTextSize*gStyle->GetImageScaling());
833 fImage->DrawTextOnPad(&t, XtoPixel(x), YtoPixel(y), gPad, fX0, fY0);
834}
835
836////////////////////////////////////////////////////////////////////////////////
837/// Draw text with URL. Same as Text.
838///
839
840void TImageDump::TextUrl(Double_t x, Double_t y, const char *chars, const char *)
841{
842 Text(x, y, chars);
843}
844
845////////////////////////////////////////////////////////////////////////////////
846///cell array begin
847
849 Double_t y1, Double_t y2)
850{
851 if (!gPad || !fImage || (w <= 0) || (h <= 0))
852 return;
853
854 fImage->BeginPaint();
855
856 fCellArrayW = w;
857 fCellArrayH = h;
858 fCellArrayColors.resize(w * h);
859 fCellArrayIdx = 0;
860
861 fCellArrayX1 = x1 < x2 ? XtoPixel(x1) : XtoPixel(x2);
862 fCellArrayX2 = x1 > x2 ? XtoPixel(x2) : XtoPixel(x1);
863 fCellArrayY1 = y1 < y2 ? YtoPixel(y1) : YtoPixel(y2);
864 fCellArrayY2 = y1 < y2 ? YtoPixel(y2) : YtoPixel(y1);
865}
866
867////////////////////////////////////////////////////////////////////////////////
868/// Cell array fill
869
871{
872 if (fCellArrayIdx >= fCellArrayColors.size())
873 return;
874
875 fImage->BeginPaint();
876
877 fCellArrayColors[fCellArrayIdx++] = ((r & 0xFF) << 16) + ((g & 0xFF) << 8) + (b & 0xFF);
878}
879
880////////////////////////////////////////////////////////////////////////////////
881/// Cell array end
882
884{
885 if (!fImage || fCellArrayColors.empty() || !fCellArrayW || !fCellArrayH)
886 return;
887
888 fImage->BeginPaint();
889
892
893 fCellArrayColors.clear();
894 fCellArrayIdx = 0;
895 fCellArrayW = 0;
896 fCellArrayH = 0;
897 fCellArrayX1 = 0;
898 fCellArrayX2 = 0;
899 fCellArrayY1 = 0;
900 fCellArrayY2 = 0;
901}
902
903////////////////////////////////////////////////////////////////////////////////
904/// Set color with its R G B components
905///
906/// - r: % of red in [0,1]
907/// - g: % of green in [0,1]
908/// - b: % of blue in [0,1]
909
911{
912}
913
914////////////////////////////////////////////////////////////////////////////////
915/// x to pixel
916
918{
919 return gPad->XtoAbsPixel(x)*gStyle->GetImageScaling() - fX0;
920}
921
922////////////////////////////////////////////////////////////////////////////////
923/// y to pixel
924
926{
927 return gPad->YtoAbsPixel(y)*gStyle->GetImageScaling() - fY0;
928}
ROOT::R::TRInterface & r
Definition Object.C:4
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
#define h(i)
Definition RSha256.hxx:106
const unsigned char gStipples[26][32]
Definition RStipples.h:24
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
short Width_t
Line width (short).
Definition RtypesCore.h:98
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
short Short_t
Signed Short integer 2 bytes (short).
Definition RtypesCore.h:53
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define hi
#define gROOT
Definition TROOT.h:417
externTStyle * gStyle
Definition TStyle.h:442
externTVirtualPS * gVirtualPS
Definition TVirtualPS.h:88
#define gPad
Style_t fFillStyle
Fill area style.
Definition TAttFill.h:25
Color_t fFillColor
Fill area color.
Definition TAttFill.h:24
Width_t fLineWidth
Line width.
Definition TAttLine.h:26
Style_t fLineStyle
Line style.
Definition TAttLine.h:25
Color_t fLineColor
Line color.
Definition TAttLine.h:24
Color_t fMarkerColor
Marker color.
Definition TAttMarker.h:24
static Style_t GetMarkerStyleBase(Style_t style)
Size_t fMarkerSize
Marker size.
Definition TAttMarker.h:26
Style_t fMarkerStyle
Marker style.
Definition TAttMarker.h:25
static Width_t GetMarkerLineWidth(Style_t style)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition TAttText.h:48
Color_t fTextColor
Text color.
Definition TAttText.h:27
Float_t fTextAngle
Text angle.
Definition TAttText.h:24
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
Definition TAttText.h:49
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition TAttText.h:50
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
Definition TAttText.h:52
Font_t fTextFont
Text font.
Definition TAttText.h:28
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition TAttText.h:53
Short_t fTextAlign
Text alignment.
Definition TAttText.h:26
Float_t fTextSize
Text size.
Definition TAttText.h:25
const char * AsHexString() const
Float_t GetAlpha() const
Definition TColor.h:67
Int_t fCellArrayY1
Definition TImageDump.h:33
void NewPage() override
new page
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Draw a Box.
void CellArrayEnd() override
Cell array end.
std::vector< UInt_t > fCellArrayColors
Definition TImageDump.h:28
void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash, const char *pDash, const char *col, UInt_t thick)
draw dashed polyline
TImageDump()
Default constructor.
Int_t YtoPixel(Double_t y)
y to pixel
TImage * fImage
Image.
Definition TImageDump.h:24
void CellArrayFill(Int_t r, Int_t g, Int_t b) override
Cell array fill.
~TImageDump() override
destructor
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override
not used
Int_t fCellArrayX1
Definition TImageDump.h:31
void Open(const char *filename, Int_t type=-111) override
Open a image file.
Int_t fX0
Definition TImageDump.h:26
void Close(Option_t *opt="") override
Close a image file.
Int_t fCellArrayX2
Definition TImageDump.h:32
Int_t fCellArrayH
Definition TImageDump.h:30
Int_t fCellArrayY2
Definition TImageDump.h:34
void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override
not used
UInt_t fCellArrayIdx
Definition TImageDump.h:35
void Text(Double_t x, Double_t y, const char *string) override
Draw text.
void SetColor(Float_t r, Float_t g, Float_t b) override
Set color with its R G B components.
Int_t fCellArrayW
Definition TImageDump.h:29
void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light) override
Draw a Frame around a box.
Int_t fType
PostScript workstation type.
Definition TImageDump.h:25
Int_t XtoPixel(Double_t x)
x to pixel
Int_t fY0
offset of selected pad to canvas
Definition TImageDump.h:26
void TextUrl(Double_t x, Double_t y, const char *string, const char *url) override
Draw text with URL.
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) override
cell array begin
static TImage * Create()
Create an image.
Definition TImage.cxx:34
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
SCoord_t fY
Definition TPoint.h:36
SCoord_t fX
Definition TPoint.h:35
SCoord_t GetY() const
Definition TPoint.h:47
SCoord_t GetX() const
Definition TPoint.h:46
Basic string class.
Definition TString.h:138
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2270
Definition TText.h:22
TVirtualPS(const TVirtualPS &)=delete
TPaveText * pt
TLine * line
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t Floor(Double_t x)
Rounds x downward, returning the largest integral value that is not greater than x.
Definition TMath.h:691
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:122
TMarker m
Definition textangle.C:8