Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGtk4PadPainter.cxx
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 12/08/2026
2
3/*************************************************************************
4 * Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#include "TGtk4PadPainter.h"
12#include "TError.h"
13#include "TSystem.h"
14#include "TStyle.h"
15#include "TEnv.h"
16#include "TMath.h"
17#include "TCanvas.h"
18#include "TPoint.h"
19#include "TROOT.h"
20#include "TColor.h"
21#include "RStipples.h"
22#include "TTFhandle.h"
23#include "TImage.h"
24
25#include <memory>
26#include <map>
27
28#include "Gtk4DrawArea.h"
29
30#include <cairomm/context.h>
31#include <cairomm/surface.h>
32#include <cairo.h>
33
34
35
36using namespace ROOT::Experimental;
37
38// to scale fonts to the same size as in the TTF
39const Float_t kScale = 0.93376068;
40
41/** \class TGtk4PadPainter
42 \ingroup gtk4canvas
43 \brief Implement TVirtualPadPainter for Gtk4 graphics
44
45 Uses Gtk4 DrawArea which creates Cairo::Context during update.
46*/
47
48//////////////////////////////////////////////////////////////////////////
49/// Set opacity - similar to TVirtualPS usecase
50
51void TGtk4PadPainter::SetOpacity(Int_t percent)
52{
54}
55
56////////////////////////////////////////////////////////////////////////////////
57///Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
58
59void TGtk4PadPainter::DrawPixels(const unsigned char * /*pixelData*/, UInt_t /*width*/, UInt_t /*height*/,
60 Int_t /*dstX*/, Int_t /*dstY*/, Bool_t /*enableAlphaBlending*/)
61{
62
63}
64
65
66////////////////////////////////////////////////////////////////////////////////
67/// Assign color to cairo context
68
70{
71 auto ctx = fDrawArea->GetContext();
72 if (!ctx)
73 return;
74
75 auto c = gROOT->GetColor(id);
76 if (c)
77 ctx->set_source_rgba(c->GetRed(), c->GetGreen(), c->GetBlue(), c->GetAlpha());
78 else
79 ctx->set_source_rgb(0, 0, 0);
80}
81
82////////////////////////////////////////////////////////////////////////////////
83/// Asign pen attributes to draw line
84
86{
87 auto ctx = fDrawArea->GetContext();
88 if (!ctx)
89 return kFALSE;
90
91 auto &att = GetAttLine();
92 if (att.GetLineWidth() <= 0)
93 return kFALSE;
94
95 SetGtk4Color(att.GetLineColor());
96 ctx->set_line_width(att.GetLineWidth());
97
98 auto style = att.GetLineStyle();
99
100 TString patt;
101 std::vector<double> pattern;
102
103 if (style > 1)
105
106 if (patt.Length() > 2) {
107 std::unique_ptr<TObjArray> tokens(patt.Tokenize(" "));
108 for (Int_t j = 0; j < tokens->GetEntries(); j++) {
109 int it = std::stoi(tokens->At(j)->GetName());
110 pattern.emplace_back(0.1 * it * att.GetLineWidth());
111 }
112 }
113
114 if (pattern.size() > 1)
115 ctx->set_dash(pattern, 0);
116 else
117 ctx->unset_dash();
118
119 return kTRUE;
120}
121
122
123////////////////////////////////////////////////////////////////////////////////
124/// Asign fill attributes before drawin shape
125
127{
128 auto ctx = fDrawArea->GetContext();
129 if (!ctx)
130 return kFALSE;
131
132 auto &att = GetAttFill();
133 fCustomPattern = 0;
134
135 Int_t style = att.GetFillStyle() / 1000;
136
137 if (style == 1) {
138 SetGtk4Color(att.GetFillColor());
139 return kTRUE;
140 }
141
142 if (style != 3)
143 return kFALSE;
144
145 Int_t fasi = att.GetFillStyle() % 1000;
146 fCustomPattern = (fasi >= 1 && fasi <=25) ? fasi : 2;
147
148 ctx->save();
149 SetGtk4Color(att.GetFillColor());
150 return kTRUE;
151}
152
153////////////////////////////////////////////////////////////////////////////////
154/// Complete fill operation - which may include custom pattern handling
155
157{
158 auto ctx = fDrawArea->GetContext();
159
160 if (fCustomPattern > 0) {
161
162 unsigned char *bitmask_bytes = (unsigned char *) gStipples[fCustomPattern];
163
164 const int width = 16, height = 16;
165 auto format = Cairo::Surface::Format::A1;
166 auto stride = Cairo::ImageSurface::format_stride_for_width(format, width);
167
168 std::vector<unsigned char> padded_bytes(stride * height, 0);
169 for (int row = 0; row < height; ++row) {
170 padded_bytes[row * stride] = bitmask_bytes[row * 2];
171 padded_bytes[row * stride + 1] = bitmask_bytes[row * 2 + 1];
172 }
173
174 auto mask_surface = Cairo::ImageSurface::create(padded_bytes.data(), format, width, height, stride);
175
176 auto pattern = Cairo::SurfacePattern::create(mask_surface);
177 pattern->set_extend(Cairo::Pattern::Extend::REPEAT);
178
179 ctx->clip();
180
181 ctx->mask(pattern);
182
183 ctx->restore();
184
185 fCustomPattern = 0;
186 } else {
187
188 ctx->fill();
189 }
190
191}
192
193
194
195////////////////////////////////////////////////////////////////////////////////
196/// Paint a simple line.
197
199{
200 if (!SetLinePen())
201 return;
202
203 const Int_t px1 = gPad->XtoAbsPixel(x1);
204 const Int_t py1 = gPad->YtoAbsPixel(y1);
205 const Int_t px2 = gPad->XtoAbsPixel(x2);
206 const Int_t py2 = gPad->YtoAbsPixel(y2);
207
208 auto ctx = fDrawArea->GetContext();
209 ctx->move_to(px1, py1);
210 ctx->line_to(px2, py2);
211 ctx->stroke();
212}
213
214
215////////////////////////////////////////////////////////////////////////////////
216/// Paint a simple line in normalized coordinates.
217
219{
220 if (!SetLinePen())
221 return;
222
223 const Int_t px1 = gPad->UtoAbsPixel(u1);
224 const Int_t py1 = gPad->VtoAbsPixel(v1);
225 const Int_t px2 = gPad->UtoAbsPixel(u2);
226 const Int_t py2 = gPad->VtoAbsPixel(v2);
227
228 auto ctx = fDrawArea->GetContext();
229 ctx->move_to(px1, py1);
230 ctx->line_to(px2, py2);
231 ctx->stroke();
232}
233
234////////////////////////////////////////////////////////////////////////////////
235/// Paint a simple box.
236
238{
239 const Int_t px1 = gPad->XtoAbsPixel(x1);
240 const Int_t py1 = gPad->YtoAbsPixel(y1);
241 const Int_t px2 = gPad->XtoAbsPixel(x2);
242 const Int_t py2 = gPad->YtoAbsPixel(y2);
243
244 auto ctx = fDrawArea->GetContext();
245 if (!ctx)
246 return;
247
249 if (SetLinePen()) {
250 ctx->rectangle(TMath::Min(px1, px2), TMath::Min(py1, py2), TMath::Abs(px2 - px1), TMath::Abs(py2 - py1));
251 ctx->stroke();
252 }
253 } else {
254 if (SetFillBrush()) {
255 ctx->rectangle(TMath::Min(px1, px2), TMath::Min(py1, py2), TMath::Abs(px2 - px1), TMath::Abs(py2 - py1));
257 }
258 }
259}
260
261////////////////////////////////////////////////////////////////////////////////
262/// Paint filled area.
263
264void TGtk4PadPainter::DrawFillArea(Int_t nPoints, const Double_t *xs, const Double_t *ys)
265{
266 if ((nPoints < 3) || !SetFillBrush())
267 return;
268
269 auto ctx = fDrawArea->GetContext();
270
271 for (Int_t n = 0; n < nPoints; ++n) {
272 auto px = gPad->XtoAbsPixel(xs[n]);
273 auto py = gPad->YtoAbsPixel(ys[n]);
274 if (n == 0)
275 ctx->move_to(px, py);
276 else
277 ctx->line_to(px, py);
278 }
279
280 ctx->close_path();
281
283}
284
285////////////////////////////////////////////////////////////////////////////////
286/// Paint filled area.
287
288void TGtk4PadPainter::DrawFillArea(Int_t nPoints, const Float_t *xs, const Float_t *ys)
289{
290 if ((nPoints < 3) || !SetFillBrush())
291 return;
292
293 auto ctx = fDrawArea->GetContext();
294
295 for (Int_t n = 0; n < nPoints; ++n) {
296 auto px = gPad->XtoAbsPixel(xs[n]);
297 auto py = gPad->YtoAbsPixel(ys[n]);
298 if (n == 0)
299 ctx->move_to(px, py);
300 else
301 ctx->line_to(px, py);
302 }
303
304 ctx->close_path();
305
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Paint Polyline.
311
312void TGtk4PadPainter::DrawPolyLine(Int_t nPoints, const Double_t *xs, const Double_t *ys)
313{
314 if ((nPoints < 2) || !SetLinePen())
315 return;
316
317 auto ctx = fDrawArea->GetContext();
318
319 for (Int_t n = 0; n < nPoints; ++n) {
320 auto px = gPad->XtoAbsPixel(xs[n]);
321 auto py = gPad->YtoAbsPixel(ys[n]);
322 if (n == 0)
323 ctx->move_to(px, py);
324 else
325 ctx->line_to(px, py);
326 }
327
328 ctx->stroke();
329}
330
331////////////////////////////////////////////////////////////////////////////////
332/// Paint polyline.
333
334void TGtk4PadPainter::DrawPolyLine(Int_t nPoints, const Float_t *xs, const Float_t *ys)
335{
336 if ((nPoints < 2) || !SetLinePen())
337 return;
338
339 auto ctx = fDrawArea->GetContext();
340
341 for (Int_t n = 0; n < nPoints; ++n) {
342 auto px = gPad->XtoAbsPixel(xs[n]);
343 auto py = gPad->YtoAbsPixel(ys[n]);
344 if (n == 0)
345 ctx->move_to(px, py);
346 else
347 ctx->line_to(px, py);
348 }
349
350 ctx->stroke();
351}
352
353////////////////////////////////////////////////////////////////////////////////
354/// Paint polyline in normalized coordinates.
355
357{
358 if ((nPoints < 2) || !SetLinePen())
359 return;
360
361 auto ctx = fDrawArea->GetContext();
362
363 for (Int_t n = 0; n < nPoints; ++n) {
364 auto px = gPad->UtoAbsPixel(u[n]);
365 auto py = gPad->VtoAbsPixel(v[n]);
366 if (n == 0)
367 ctx->move_to(px, py);
368 else
369 ctx->line_to(px, py);
370 }
371
372 ctx->stroke();
373}
374
375////////////////////////////////////////////////////////////////////////////////
376/// Helper function to paint markers
377
378template<typename T>
379void drawMarkersHelper(Int_t nPoints, const T *x, const T *y,
380 const TAttMarker &attr, Cairo::Context *ctx)
381{
382 if (!ctx || nPoints < 1)
383 return;
384
385 auto markerLineWidth = TAttMarker::GetMarkerLineWidth(attr.GetMarkerStyle());
386 Int_t markerSize = 0; ///< size of simple markers
387 std::vector<TPoint> markerShape; ///< marker shape points
388 auto markerType = attr.GetMarkerShape(markerSize, markerShape);
389
390 if ((markerType == TAttMarker::kShapeDot) || (markerLineWidth > 0)) {
391 ctx->set_line_width(markerLineWidth);
392 } else {
393 }
394
395 for (Int_t n = 0; n < nPoints; ++n) {
396 Int_t px = gPad->XtoAbsPixel(x[n]);
397 Int_t py = gPad->YtoAbsPixel(y[n]);
398 Int_t cnt = 0;
399
400 switch(markerType) {
402 ctx->rectangle(px + 0.5, py + 0.5, 1., 1.);
403 ctx->fill();
404 break;
406 ctx->arc(px, py, markerSize / 2, 0.0, 2.0 * TMath::Pi());
407 ctx->stroke();
408 break;
410 // hollow or filled circle
411 ctx->arc(px, py, markerSize / 2, 0.0, 2.0 * TMath::Pi());
412 ctx->fill();
413 break;
415 // hollow polygon
416 for (auto &pnt : markerShape)
417 if (cnt++)
418 ctx->line_to(px + pnt.fX, py + pnt.fY);
419 else
420 ctx->move_to(px + pnt.fX, py + pnt.fY);
421 ctx->stroke();
422 break;
424 // filled polygon
425 for (auto &pnt : markerShape)
426 if (cnt++)
427 ctx->line_to(px + pnt.fX, py + pnt.fY);
428 else
429 ctx->move_to(px + pnt.fX, py + pnt.fY);
430 ctx->close_path();
431 ctx->fill();
432 break;
434 // segmented line
435 for (size_t i = 0; i < markerShape.size() - 1; i += 2) {
436 ctx->move_to(px + markerShape[i].fX, py + markerShape[i].fY);
437 ctx->line_to(px + markerShape[i+1].fX, py + markerShape[i+1].fY);
438 if (i == markerShape.size() - 2)
439 ctx->stroke();
440 else
441 ctx->stroke_preserve();
442 }
443 break;
445 // filled triangles
446 for (size_t i = 0; i < markerShape.size() - 2; i += 3) {
447 ctx->move_to(px + markerShape[i].fX, py + markerShape[i].fY);
448 ctx->line_to(px + markerShape[i+1].fX, py + markerShape[i+1].fY);
449 ctx->line_to(px + markerShape[i+2].fX, py + markerShape[i+2].fY);
450 ctx->close_path();
451 if (i == markerShape.size() - 3)
452 ctx->fill();
453 else
454 ctx->fill_preserve();
455 }
456 break;
457 }
458 }
459}
460
461////////////////////////////////////////////////////////////////////////////////
462/// Paint polymarker.
463
465{
467
468 drawMarkersHelper<Double_t>(nPoints, x, y,
470}
471
472////////////////////////////////////////////////////////////////////////////////
473/// Paint polymarker.
474
476{
478
479 drawMarkersHelper<Float_t>(nPoints, x, y,
481}
482
483////////////////////////////////////////////////////////////////////////////////
484/// Produce image
485
486void TGtk4PadPainter::SaveImage(TVirtualPad * /* pad */, const char * /* fileName */, Int_t /* gtype */) const
487{
488}
489
490////////////////////////////////////////////////////////////////////////////////
491/// Render TTF glyphs on drawable area
492
494{
495 // position inside the pad is provided, therefore shift it to global image
496 px += fPad->UtoAbsPixel(0);
497 py += fPad->VtoAbsPixel(1);
498
499 auto ctx = fDrawArea->GetContext();
500
502
503 for (UInt_t nglyph = 0; nglyph < ttf.GetNumGlyphs(); nglyph++) {
504 Int_t bx = 0, by = 0;
505 UChar_t *buffer = nullptr;
506 UInt_t width = 0, rows = 0, pitch = 0;
507 if (!ttf.GetGlyphData(nglyph, bx, by, buffer, width, rows, pitch))
508 continue;
509
510 // Cairo's A8 surfaces need their own row stride (padding), which
511 // usually differs from FreeType's bmp.pitch - copy row by row
512 auto stride = Cairo::ImageSurface::format_stride_for_width(Cairo::Surface::Format::A8, width);
513 std::vector<unsigned char> data(stride * rows, 0);
514
515 for (unsigned int row = 0; row < rows; ++row)
516 std::memcpy(data.data() + row * stride, buffer + row * pitch, width);
517
518 auto surface =
519 Cairo::ImageSurface::create(data.data(), Cairo::Surface::Format::A8, width, rows, stride);
520
521 ctx->mask(surface, px + bx, py + by);
522 }
523}
524
525
526////////////////////////////////////////////////////////////////////////////////
527/// Render image on drawable area
528
530{
531 // position inside the pad is provided, therefore shift it to global image
532 px += fPad->UtoAbsPixel(0);
533 py += fPad->VtoAbsPixel(1);
534
535 auto width = img->GetWidth();
536 auto height = img->GetHeight();
537 auto argbBuffer = (unsigned char*) img->GetArgbArray();
538
539 auto ctx = fDrawArea->GetContext();
540
541 int stride = Cairo::ImageSurface::format_stride_for_width(Cairo::Surface::Format::ARGB32, width);
542
543 Cairo::RefPtr<Cairo::ImageSurface> surface =
544 Cairo::ImageSurface::create(argbBuffer, Cairo::Surface::Format::ARGB32, width, height, stride);
545
546 ctx->set_source(surface, px, py);
547
548 ctx->paint();
549}
550
551////////////////////////////////////////////////////////////////////////////////
552/// extract image from recent drawing
553
555{
556 auto canv = pad->GetCanvas();
557
558 if (canv != fDrawArea->GetCanvas()) {
559 ::Error("TGtk4PadPainter::FillImageFromPad", "Provided pad does not belong to the canvas");
560 return kFALSE;
561 }
562
563 auto cache = fDrawArea->GetCache();
564 if (!cache) {
565 ::Error("TGtk4PadPainter::FillImageFromPad", "Canvas was not rendered yet");
566 return kFALSE;
567 }
568
569 if (cache->get_format() != Cairo::Surface::Format::ARGB32) {
570 ::Error("TGtk4PadPainter::FillImageFromPad", "Wrong internal format of cached image");
571 return kFALSE;
572 }
573
574 int width = cache->get_width();
575 int height = cache->get_height();
576 int stride = cache->get_stride();
577 const uint8_t* raw_data = cache->get_data();
578
579 int x = 0, y = 0, w = width, h = height;
580
581 if (pad != canv) {
582 x = pad->UtoAbsPixel(0);
583 y = pad->VtoAbsPixel(1);
584 w = pad->GetPadWidth();
585 h = pad->GetPadHeight();
586 } else if (stride == width * 4) {
587 // special case when raw data can be used as is
588 image->FromBitmap((const UChar_t *) raw_data, width, height);
589 return kTRUE;
590 }
591
592 std::vector<UChar_t> pixels(w * h * 4);
593
594 for (int i = 0; i < h; ++i) {
595 // Find the start of the current row in the Cairo surface
596 const uint8_t* row_src = raw_data + (i + y) * stride + x * 4;
597
598 // Find where to put it in our tightly packed output vector
599 auto row_dest = pixels.data() + i * w * 4;
600
601 std::copy(row_src, row_src + w * 4, row_dest);
602 }
603
604 image->FromBitmap(pixels.data(), w, h);
605
606 return kTRUE;
607
608
609}
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
const unsigned char gStipples[26][32]
Definition RStipples.h:24
short Color_t
Color number (short)
Definition RtypesCore.h:100
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
Definition RtypesCore.h:53
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t width
Option_t Option_t TPoint TPoint percent
Option_t Option_t style
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char y1
const Float_t kScale
void drawMarkersHelper(Int_t nPoints, const T *x, const T *y, const TAttMarker &attr, Cairo::Context *ctx)
Helper function to paint markers.
#define gROOT
Definition TROOT.h:417
R__EXTERN TStyle * gStyle
Definition TStyle.h:442
#define gPad
Cairo::Context * GetContext() const
TCanvas * GetCanvas() const
Cairo::ImageSurface * GetCache() const
void SetGtk4Color(Color_t id)
Assign color to cairo context.
void DrawImage(TImage *img, Int_t x, Int_t y, Int_t flags=0) override
Render image on drawable area.
void DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *v) override
Paint polyline in normalized coordinates.
void DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y) override
Paint Polyline.
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t height, Int_t dstX, Int_t dstY, Bool_t enableAlphaBlending) override
Noop, for non-gl pad TASImage calls gVirtualX->CopyArea.
void ApplyFillBrush()
Complete fill operation - which may include custom pattern handling.
Bool_t SetFillBrush()
Asign fill attributes before drawin shape.
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Paint a simple line.
void DrawTTFglyphs(Int_t x, Int_t y, TTFhandle &ttf, ETextMode mode) override
Render TTF glyphs on drawable area.
Bool_t SetLinePen()
Asign pen attributes to draw line.
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y) override
Paint filled area.
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) override
Paint a simple line in normalized coordinates.
void SaveImage(TVirtualPad *, const char *, Int_t) const override
Produce image.
Bool_t FillImageFromPad(TImage *image, TVirtualPad *pad) const override
extract image from recent drawing
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBoxMode mode) override
Paint a simple box.
void DrawPolyMarker(Int_t n, const Double_t *x, const Double_t *y) override
Paint polymarker.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition TAttFill.h:42
Marker Attributes class.
Definition TAttMarker.h:22
static Width_t GetMarkerLineWidth(Style_t style)
Internal helper function that returns the line width of the given marker style (0 = filled marker)
@ kShapeTriangles
Definition TAttMarker.h:48
@ kShapeFilledArea
Definition TAttMarker.h:48
@ kShapeFilledCircle
Definition TAttMarker.h:48
An abstract interface to image processing library.
Definition TImage.h:30
virtual UInt_t * GetArgbArray()
Definition TImage.h:255
virtual UInt_t GetWidth() const
Definition TImage.h:243
virtual UInt_t GetHeight() const
Definition TImage.h:244
Color_t GetMarkerColor() const override
const TAttText & GetAttText() const override
Get text attributes.
const TAttMarker & GetAttMarker() const override
Get marker attributes.
const TAttFill & GetAttFill() const override
Get fill attributes.
TVirtualPad * fPad
TAttFill fAttFill
current fill attributes
Color_t GetTextColor() const override
const TAttLine & GetAttLine() const override
Get line attributes.
Basic string class.
Definition TString.h:137
Ssiz_t Length() const
Definition TString.h:426
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Definition TString.cxx:2345
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
Definition TStyle.cxx:1167
Dynamic handle to work with freetype 2 library.
Definition TTFhandle.h:21
UInt_t GetNumGlyphs() const
return number of glyphs
Bool_t GetGlyphData(UInt_t n, Int_t &offx, Int_t &offy, UChar_t *&buffer, UInt_t &width, UInt_t &rows, UInt_t &pitch)
Returns data for glyph bitmap Instead direct access to FT_BitmapGlyph one can obtain all relevant fie...
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:53
virtual Int_t UtoAbsPixel(Double_t u) const =0
virtual UInt_t GetPadWidth() const =0
virtual UInt_t GetPadHeight() const =0
virtual Int_t VtoAbsPixel(Double_t v) const =0
virtual TCanvas * GetCanvas() const =0
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Namespace for ROOT features in testing.
Definition TROOT.h:100
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Definition TMathBase.h:197
constexpr Double_t Pi()
Definition TMath.h:40
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:122