Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
TGGC.cxx
Go to the documentation of this file.
1// @(#)root/gui:$Id$
2// Author: Fons Rademakers 20/9/2000
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
13/** \class TGGC
14 \ingroup guiwidgets
15
16Encapsulate a graphics context used in the low level graphics.
17TGGCPool provides a pool of graphics contexts.
18
19*/
20
21
22#include "TGClient.h"
23#include "TGGC.h"
24#include "TVirtualX.h"
25#include "THashTable.h"
26#include "TColor.h"
27#include "TROOT.h"
28
29#include <iostream>
30#include <cstring>
31
32
34
35////////////////////////////////////////////////////////////////////////////////
36/// Create a graphics context (only called via TGGCPool::GetGC()).
37
39{
40 fContext = 0;
41 if (values) {
42 fValues = *values;
43 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), values);
44 if (values->fMask & kGCDashList) {
45 if (values->fDashLen > (Int_t)sizeof(fValues.fDashes))
46 Warning("TGGC", "dash list can have only up to %ld elements",
47 (Long_t)sizeof(fValues.fDashes));
51 }
52 } else {
53 fValues = {};
54 fContext = 0;
55 }
56 SetRefCount(1);
57}
58
59////////////////////////////////////////////////////////////////////////////////
60/// Create a graphics context, registers GC in GCPool.
61
63{
64 fContext = 0;
65 // case of default ctor at program startup before gClient exists
66 if (!values) {
67 fValues = {};
68 fContext = 0;
69 SetRefCount(1);
70 return;
71 }
72
73 if (gClient)
74 gClient->GetGC(values, kTRUE);
75 else {
76 fContext = 0;
77 Error("TGGC", "TGClient not yet initialized, should never happen");
78 }
79}
80
81////////////////////////////////////////////////////////////////////////////////
82/// Copy a graphics context.
83
85{
86 fValues = g.fValues;
87 if (g.fContext) {
88 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), &fValues);
92 } else
93 fContext = 0;
94 SetRefCount(1);
95
96 if (gClient)
97 gClient->GetGCPool()->fList->Add(this);
98}
99
100////////////////////////////////////////////////////////////////////////////////
101/// Delete graphics context.
102
104{
105 if (gClient)
106 gClient->GetGCPool()->ForceFreeGC(this);
107
108 if (fContext)
109 gVirtualX->DeleteGC(fContext);
110}
111
112////////////////////////////////////////////////////////////////////////////////
113/// Graphics context assignment operator.
114
116{
117 if (this != &rhs) {
118 if (!fContext && gClient) {
119 TGGC *gc = gClient->GetGCPool()->FindGC(this);
120 if (!gc)
121 gClient->GetGCPool()->fList->Add(this);
122 }
123 if (fContext)
124 gVirtualX->DeleteGC(fContext);
126 fValues = rhs.fValues;
127 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), &fValues);
131 }
132 return *this;
133}
134
135////////////////////////////////////////////////////////////////////////////////
136/// Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0).
137
139{
140 return fContext;
141}
142
143////////////////////////////////////////////////////////////////////////////////
144/// Update values + mask.
145
147{
148 fValues.fMask |= values->fMask;
149
150 for (Mask_t bit = 1; bit <= fValues.fMask; bit <<= 1) {
151 switch (bit & values->fMask) {
152 default:
153 case 0:
154 continue;
155 case kGCFunction:
156 fValues.fFunction = values->fFunction;
157 break;
158 case kGCPlaneMask:
159 fValues.fPlaneMask = values->fPlaneMask;
160 break;
161 case kGCForeground:
163 break;
164 case kGCBackground:
166 break;
167 case kGCLineWidth:
168 fValues.fLineWidth = values->fLineWidth;
169 break;
170 case kGCLineStyle:
171 fValues.fLineStyle = values->fLineStyle;
172 break;
173 case kGCCapStyle:
174 fValues.fCapStyle = values->fCapStyle;
175 break;
176 case kGCJoinStyle:
177 fValues.fJoinStyle = values->fJoinStyle;
178 break;
179 case kGCFillStyle:
180 fValues.fFillStyle = values->fFillStyle;
181 break;
182 case kGCFillRule:
183 fValues.fFillRule = values->fFillRule;
184 break;
185 case kGCTile:
186 fValues.fTile = values->fTile;
187 break;
188 case kGCStipple:
189 fValues.fStipple = values->fStipple;
190 break;
192 fValues.fTsXOrigin = values->fTsXOrigin;
193 break;
195 fValues.fTsYOrigin = values->fTsYOrigin;
196 break;
197 case kGCFont:
198 fValues.fFont = values->fFont;
199 break;
200 case kGCSubwindowMode:
202 break;
205 break;
206 case kGCClipXOrigin:
208 break;
209 case kGCClipYOrigin:
211 break;
212 case kGCClipMask:
213 fValues.fClipMask = values->fClipMask;
214 break;
215 case kGCDashOffset:
217 break;
218 case kGCDashList:
219 if (values->fDashLen > (Int_t)sizeof(fValues.fDashes))
220 Warning("UpdateValues", "dash list can have only up to %ld elements",
221 (Long_t)sizeof(fValues.fDashes));
224 break;
225 case kGCArcMode:
226 fValues.fArcMode = values->fArcMode;
227 break;
228 }
229 }
230}
231
232////////////////////////////////////////////////////////////////////////////////
233/// Set attributes as specified in the values structure.
234
236{
237 if (!fContext && gClient) {
238 TGGC *gc = gClient->GetGCPool()->FindGC(this);
239 if (!gc)
240 gClient->GetGCPool()->fList->Add(this);
241 }
242
243 if (fContext)
244 gVirtualX->ChangeGC(fContext, values);
245 else
246 fContext = gVirtualX->CreateGC(gVirtualX->GetDefaultRootWindow(), values);
247 UpdateValues(values);
248 if (values->fMask & kGCDashList)
251}
252
253////////////////////////////////////////////////////////////////////////////////
254/// Set graphics context drawing function.
255
257{
258 GCValues_t values;
259 values.fFunction = v;
260 values.fMask = kGCFunction;
261 SetAttributes(&values);
262}
263
264////////////////////////////////////////////////////////////////////////////////
265/// Set plane mask.
266
268{
269 GCValues_t values;
270 values.fPlaneMask = v;
271 values.fMask = kGCPlaneMask;
272 SetAttributes(&values);
273}
274
275////////////////////////////////////////////////////////////////////////////////
276/// Set foreground color.
277
279{
280 GCValues_t values;
281 values.fForeground = v;
282 values.fMask = kGCForeground;
283 SetAttributes(&values);
284}
285
286////////////////////////////////////////////////////////////////////////////////
287/// Set background color.
288
290{
291 GCValues_t values;
292 values.fBackground = v;
293 values.fMask = kGCBackground;
294 SetAttributes(&values);
295}
296
297////////////////////////////////////////////////////////////////////////////////
298/// Set line width.
299
301{
302 GCValues_t values;
303 values.fLineWidth = v;
304 values.fMask = kGCLineWidth;
305 SetAttributes(&values);
306}
307
308////////////////////////////////////////////////////////////////////////////////
309/// Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
310
312{
313 GCValues_t values;
314 values.fLineStyle = v;
315 values.fMask = kGCLineStyle;
316 SetAttributes(&values);
317}
318
319////////////////////////////////////////////////////////////////////////////////
320/// Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
321
323{
324 GCValues_t values;
325 values.fCapStyle = v;
326 values.fMask = kGCCapStyle;
327 SetAttributes(&values);
328}
329
330////////////////////////////////////////////////////////////////////////////////
331/// Set line join style (kJoinMiter, kJoinRound, kJoinBevel).
332
334{
335 GCValues_t values;
336 values.fJoinStyle = v;
337 values.fMask = kGCJoinStyle;
338 SetAttributes(&values);
339}
340
341////////////////////////////////////////////////////////////////////////////////
342/// Set fill style (kFillSolid, kFillTiled, kFillStippled,
343/// kFillOpaeueStippled).
344
346{
347 GCValues_t values;
348 values.fFillStyle = v;
349 values.fMask = kGCFillStyle;
350 SetAttributes(&values);
351}
352
353////////////////////////////////////////////////////////////////////////////////
354/// Set fill rule (kEvenOddRule, kWindingRule).
355
357{
358 GCValues_t values;
359 values.fFillRule = v;
360 values.fMask = kGCFillRule;
361 SetAttributes(&values);
362}
363
364////////////////////////////////////////////////////////////////////////////////
365/// Set tile pixmap for tiling operations.
366
368{
369 GCValues_t values;
370 values.fTile = v;
371 values.fMask = kGCTile;
372 SetAttributes(&values);
373}
374
375////////////////////////////////////////////////////////////////////////////////
376/// Set 1 plane pixmap for stippling.
377
379{
380 GCValues_t values;
381 values.fStipple = v;
382 values.fMask = kGCStipple;
383 SetAttributes(&values);
384}
385
386////////////////////////////////////////////////////////////////////////////////
387/// X offset for tile or stipple operations.
388
390{
391 GCValues_t values;
392 values.fTsXOrigin = v;
393 values.fMask = kGCTileStipXOrigin;
394 SetAttributes(&values);
395}
396
397////////////////////////////////////////////////////////////////////////////////
398/// Y offset for tile or stipple operations.
399
401{
402 GCValues_t values;
403 values.fTsYOrigin = v;
404 values.fMask = kGCTileStipYOrigin;
405 SetAttributes(&values);
406}
407
408////////////////////////////////////////////////////////////////////////////////
409/// Set font.
410
412{
413 GCValues_t values;
414 values.fFont = v;
415 values.fMask = kGCFont;
416 SetAttributes(&values);
417}
418
419////////////////////////////////////////////////////////////////////////////////
420/// Set sub window mode (kClipByChildren, kIncludeInferiors).
421
423{
424 GCValues_t values;
425 values.fSubwindowMode = v;
426 values.fMask = kGCSubwindowMode;
427 SetAttributes(&values);
428}
429
430////////////////////////////////////////////////////////////////////////////////
431/// True if graphics exposure should be generated.
432
434{
435 GCValues_t values;
436 values.fGraphicsExposures = v;
438 SetAttributes(&values);
439}
440
441////////////////////////////////////////////////////////////////////////////////
442/// X origin for clipping.
443
445{
446 GCValues_t values;
447 values.fClipXOrigin = v;
448 values.fMask = kGCClipXOrigin;
449 SetAttributes(&values);
450}
451
452////////////////////////////////////////////////////////////////////////////////
453/// Y origin for clipping.
454
456{
457 GCValues_t values;
458 values.fClipYOrigin = v;
459 values.fMask = kGCClipYOrigin;
460 SetAttributes(&values);
461}
462
463////////////////////////////////////////////////////////////////////////////////
464/// Bitmap for clipping.
465
467{
468 GCValues_t values;
469 values.fClipMask = v;
470 values.fMask = kGCClipMask;
471 SetAttributes(&values);
472}
473
474////////////////////////////////////////////////////////////////////////////////
475/// Patterned/dashed line offset.
476
478{
479 GCValues_t values;
480 values.fDashOffset = v;
481 values.fMask = kGCDashOffset;
482 SetAttributes(&values);
483}
484
485////////////////////////////////////////////////////////////////////////////////
486/// Set dash pattern. First use SetDashOffset() if not 0.
487
488void TGGC::SetDashList(const char v[], Int_t len)
489{
490 GCValues_t values;
491 if (len > (Int_t)sizeof(values.fDashes))
492 Warning("SetDashList", "dash list can have only up to %ld elements",
493 (Long_t)sizeof(values.fDashes));
494 values.fDashLen = TMath::Min(len, (Int_t)sizeof(values.fDashes));
495 memcpy(values.fDashes, v, values.fDashLen);
496 values.fMask = kGCDashList;
497 SetAttributes(&values);
498}
499
500////////////////////////////////////////////////////////////////////////////////
501/// Set arc mode (kArcChord, kArcPieSlice).
502
504{
505 GCValues_t values;
506 values.fArcMode = v;
507 values.fMask = kGCArcMode;
508 SetAttributes(&values);
509}
510
511////////////////////////////////////////////////////////////////////////////////
512/// Print graphics contexts info.
513
515{
516 Printf("TGGC: mask = %x, handle = %lx, ref cnt = %u", fValues.fMask,
518}
519
520////////////////////////////////////////////////////////////////////////////////
521/// Returns GC mask as a string - used in SavePrimitive().
522
524{
526
527 Mask_t fmask = GetMask();
528
529 if (fmask & kGCFunction) {
530 if (mask.Length() == 0) mask = "kGCFunction";
531 else mask += " | kGCFunction";
532 }
533 if (fmask & kGCPlaneMask) {
534 if (mask.Length() == 0) mask = "kGCPlaneMask";
535 else mask += " | kGCPlaneMask";
536 }
537 if (fmask & kGCForeground) {
538 if (mask.Length() == 0) mask = "kGCForeground";
539 else mask += " | kGCForeground";
540 }
541 if (fmask & kGCBackground) {
542 if (mask.Length() == 0) mask = "kGCBackground";
543 else mask += " | kGCBackground";
544 }
545 if (fmask & kGCLineWidth) {
546 if (mask.Length() == 0) mask = "kGCLineWidth";
547 else mask += " | kGCLineWidth";
548 }
549 if (fmask & kGCLineStyle) {
550 if (mask.Length() == 0) mask = "kGCLineStyle";
551 else mask += " | kGCLineStyle";
552 }
553 if (fmask & kGCCapStyle) {
554 if (mask.Length() == 0) mask = "kGCCapStyle";
555 else mask += " | kGCCapStyle";
556 }
557 if (fmask & kGCJoinStyle) {
558 if (mask.Length() == 0) mask = "kGCJoinStyle";
559 else mask += " | kGCJoinStyle";
560 }
561 if (fmask & kGCFillStyle) {
562 if (mask.Length() == 0) mask = "kGCFillStyle";
563 else mask += " | kGCFillStyle";
564 }
565 if (fmask & kGCFillRule) {
566 if (mask.Length() == 0) mask = "kGCFillRule";
567 else mask += " | kGCFillRule";
568 }
569 if (fmask & kGCTile) {
570 if (mask.Length() == 0) mask = "kGCTile";
571 else mask += " | kGCTile";
572 }
573 if (fmask & kGCStipple) {
574 if (mask.Length() == 0) mask = "kGCStipple";
575 else mask += " | kGCStipple";
576 }
578 if (mask.Length() == 0) mask = "kGCTileStipXOrigin";
579 else mask += " | kGCTileStipXOrigin";
580 }
582 if (mask.Length() == 0) mask = "kGCTileStipYOrigin";
583 else mask += " | kGCTileStipYOrigin";
584 }
585 if (fmask & kGCFont) {
586 if (mask.Length() == 0) mask = "kGCFont";
587 else mask += " | kGCFont";
588 }
589 if (fmask & kGCSubwindowMode) {
590 if (mask.Length() == 0) mask = "kGCSubwindowMode";
591 else mask += " | kGCSubwindowMode";
592 }
594 if (mask.Length() == 0) mask = "kGCGraphicsExposures";
595 else mask += " | kGCGraphicsExposures";
596 }
597 if (fmask & kGCClipXOrigin) {
598 if (mask.Length() == 0) mask = "kGCClipXOrigin";
599 else mask += " | kGCClipXOrigin";
600 }
601 if (fmask & kGCClipYOrigin) {
602 if (mask.Length() == 0) mask = "kGCClipYOrigin";
603 else mask += " | kGCClipYOrigin";
604 }
605 if (fmask & kGCClipMask) {
606 if (mask.Length() == 0) mask = "kGCClipMask";
607 else mask += " | kGCClipMask";
608 }
609 if (fmask & kGCDashOffset) {
610 if (mask.Length() == 0) mask = "kGCDashOffset";
611 else mask += " | kGCDashOffset";
612 }
613 if (fmask & kGCDashList) {
614 if (mask.Length() == 0) mask = "kGCDashList";
615 else mask += " | kGCDashList";
616 }
617 if (fmask & kGCArcMode) {
618 if (mask.Length() == 0) mask = "kGCArcMode";
619 else mask += " | kGCArcMode";
620 }
621 return mask;
622}
623
624////////////////////////////////////////////////////////////////////////////////
625/// Save graphics context info as a C++ statement(s) on output stream out
626
627void TGGC::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
628{
629 out << " \n";
630 // declare graphics context object to reflect required user changes
631 if (!gROOT->ClassSaved(TGGC::Class()))
632 out << " TGGC *uGC; // will reflect user GC changes\n";
633
634 Mask_t fmask = GetMask();
635
637 const char *colorname;
638 ULong_t color;
639
640 out << " // graphics context changes\n";
641 out << " GCValues_t " << valname << ";\n";
642 out << " " << valname << ".fMask = " << GetMaskString() << ";\n";
643
644 for (Mask_t bit = 1; bit <= fmask; bit <<= 1) {
645 switch (bit & fmask) {
646 default:
647 case 0:
648 continue;
649 case kGCFunction:
650 out << " " << valname << ".fFunction = ";
651 switch (GetFunction()) {
652 case kGXclear:
653 out << "kGXclear";
654 break;
655 case kGXand:
656 out << "kGXand";
657 break;
658 case kGXandReverse:
659 out << "kGXandReverse";
660 break;
661 case kGXcopy:
662 out << "kGXcopy";
663 break;
664 case kGXandInverted:
665 out << "kGXandInverted";
666 break;
667 case kGXnoop:
668 out << "kGXnoop";
669 break;
670 case kGXxor:
671 out << "kGXxor";
672 break;
673 case kGXor:
674 out << "kGXor";
675 break;
676 case kGXnor:
677 out << "kGXnor";
678 break;
679 case kGXequiv:
680 out << "kGXequiv";
681 break;
682 case kGXinvert:
683 out << "kGXinvert";
684 break;
685 case kGXorReverse:
686 out << "kGXorReverse";
687 break;
688 case kGXcopyInverted:
689 out << "kGXcopyInverted";
690 break;
691 case kGXorInverted:
692 out << "kGXorInverted";
693 break;
694 case kGXnand:
695 out << "kGXnand";
696 break;
697 case kGXset:
698 out << "kGXset";
699 break;
700 }
701 out << ";\n";
702 break;
703 case kGCPlaneMask:
704 out << " " << valname << ".fPlaneMask = " << GetPlaneMask() << ";\n";
705 break;
706 case kGCForeground:
707 color = GetForeground();
709 out << " gClient->GetColorByName(\"" << colorname << "\", " << valname << ".fForeground);\n";
710 break;
711 case kGCBackground:
712 color = GetBackground();
714 out << " gClient->GetColorByName(\"" << colorname << "\", " << valname << ".fBackground);\n";
715 break;
716 case kGCLineWidth:
717 out << " " << valname << ".fLineWidth = " << GetLineWidth() << ";\n";
718 break;
719 case kGCLineStyle:
720 out << " " << valname << ".fLineStyle = ";
721 switch (GetLineStyle()) {
722 case kLineSolid:
723 out << "kLineSolid";
724 break;
725 case kLineOnOffDash:
726 out << "kLineOnOffDash";
727 break;
728 case kLineDoubleDash:
729 out << "kLineDoubleDash";
730 break;
731 }
732 out << ";\n";
733 break;
734 case kGCCapStyle:
735 out << " " << valname << ".fCapStyle = ";
736 switch (GetCapStyle()) {
737 case kCapNotLast:
738 out << "kCapNotLast";
739 break;
740 case kCapButt:
741 out << "kCapButt";
742 break;
743 case kCapRound:
744 out << "kCapRound";
745 break;
746 case kCapProjecting:
747 out << "kCapProjecting";
748 break;
749 }
750 out << ";\n";
751 break;
752 case kGCJoinStyle:
753 out << " " << valname << ".fJoinStyle = ";
754 switch (GetJoinStyle()) {
755 case kJoinMiter:
756 out << "kJoinMiter";
757 break;
758 case kJoinRound:
759 out << "kJoinRound";
760 break;
761 case kJoinBevel:
762 out << "kJoinBevel";
763 break;
764 }
765 out << ";\n";
766 break;
767 case kGCFillStyle:
768 out << " " << valname << ".fFillStyle = ";
769 switch (GetFillStyle()) {
770 case kFillSolid:
771 out << "kFillSolid";
772 break;
773 case kFillTiled:
774 out << "kFillTiled";
775 break;
776 case kFillStippled:
777 out << "kFillStippled";
778 break;
780 out << "kFillOpaqueStippled";
781 break;
782 }
783 out << ";\n";
784 break;
785 case kGCFillRule:
786 out << " " << valname << ".fFillRule = ";
787 switch (GetFillRule()) {
788 case kEvenOddRule:
789 out << "kEvenOddRule";
790 break;
791 case kWindingRule:
792 out << "kWindingRule";
793 break;
794 }
795 out << ";\n";
796 break;
797 case kGCTile:
798 out << " " << valname << ".fTile = " << GetTile() << ";\n";
799 break;
800 case kGCStipple:
801 out << " " << valname << ".fStipple = " << GetStipple() << ";\n";
802 break;
804 out << " " << valname << ".fTsXOrigin = " << GetTileStipXOrigin() << ";\n";
805 break;
807 out << " " << valname << ".fTsYOrigin = " << GetTileStipYOrigin() << ";\n";
808 break;
809 case kGCFont:
810 out << " " << valname << ".fFont = ufont->GetFontHandle();\n";
811 break;
812 case kGCSubwindowMode:
813 out << " " << valname << ".fSubwindowMode = ";
814 switch (GetSubwindowMode()) {
815 case kClipByChildren:
816 out << "kClipByChildren";
817 break;
819 out << "kIncludeInferiors";
820 break;
821 }
822 out << ";\n";
823 break;
825 out << " " << valname << ".fGraphicsExposures = ";
827 out << "kTRUE";
828 else
829 out << "kFALSE";
830 out << ";\n";
831 break;
832 case kGCClipXOrigin:
833 out << " " << valname << ".fClipXOrigin = " << GetClipXOrigin() << ";\n";
834 break;
835 case kGCClipYOrigin:
836 out << " " << valname << ".fClipYOrigin = " << GetClipYOrigin() << ";\n";
837 break;
838 case kGCClipMask:
839 out << " " << valname << ".fClipMask = " << GetClipMask() << ";\n";
840 break;
841 case kGCDashOffset:
842 out << " " << valname << ".fDashOffset = " << GetDashOffset() << ";\n";
843 break;
844 case kGCDashList:
845 if (GetDashLen() > (Int_t)sizeof(GetDashes()))
846 Warning("SavePrimitive", "dash list can have only up to %ld elements",
847 (Long_t)sizeof(GetDashes()));
848 out << " " << valname << ".fDashLen = "
849 << TMath::Min(GetDashLen(),(Int_t)sizeof(GetDashes())) << ";\n";
850 out << " memcpy(GetDashes()," << valname << ".fDashes,"
851 << valname << ".fDashLen);\n";
852 break;
853 case kGCArcMode:
854 out << " " << valname << ".fArcMode = ";
855 switch (GetArcMode()) {
856 case kArcChord:
857 out << "kArcChord";
858 break;
859 case kArcPieSlice:
860 out << "kArcPieSlice";
861 break;
862 }
863 out << ";\n";
864 break;
865 }
866 }
867 out << " uGC = gClient->GetGC(&" << valname << ", kTRUE);\n";
868}
869
870
872
873////////////////////////////////////////////////////////////////////////////////
874/// Create graphics context pool.
875
877{
878 fClient = client;
879 fList = new THashTable;
880 fList->SetOwner();
881}
882
883////////////////////////////////////////////////////////////////////////////////
884/// Delete graphics context pool.
885
887{
888 delete fList;
889}
890
891////////////////////////////////////////////////////////////////////////////////
892/// Force remove graphics context from list. Is only called via ~TGGC().
893
895{
896 TGGC *gc = (TGGC *) fList->FindObject(gct);
897
898 if (gc) {
899 if (gc->References() > 1)
900 Error("ForceFreeGC", "removed a shared graphics context\n"
901 "best to use graphics contexts via the TGGCPool()");
902 fList->Remove(gc);
903 }
904}
905
906////////////////////////////////////////////////////////////////////////////////
907/// Delete graphics context if it is not used anymore.
908
910{
911 TGGC *gc = (TGGC *) fList->FindObject(gct);
912
913 if (gc) {
914 if (gc->RemoveReference() == 0) {
915 fList->Remove(gc);
916 delete gc;
917 }
918 }
919}
920
921////////////////////////////////////////////////////////////////////////////////
922/// Delete graphics context if it is not used anymore.
923
925{
926 TIter next(fList);
927
928 while (TGGC *gc = (TGGC *) next()) {
929 if (gc->fContext == gct) {
930 if (gc->RemoveReference() == 0) {
931 fList->Remove(gc);
932 delete gc;
933 return;
934 }
935 }
936 }
937}
938
939////////////////////////////////////////////////////////////////////////////////
940/// Find graphics context. Returns 0 in case gc is not found.
941
943{
944 return (TGGC*) fList->FindObject(gct);
945}
946
947////////////////////////////////////////////////////////////////////////////////
948/// Find graphics context based on its GContext_t handle. Returns 0
949/// in case gc is not found.
950
952{
953 TIter next(fList);
954
955 while (TGGC *gc = (TGGC *) next()) {
956 if (gc->fContext == gct)
957 return gc;
958 }
959 return 0;
960}
961
962////////////////////////////////////////////////////////////////////////////////
963/// returns graphics context based on its GContext_t handle.
964
966{
968 gVirtualX->GetGCValues(gct, gval);
969 return GetGC(&gval, kTRUE);
970}
971
972////////////////////////////////////////////////////////////////////////////////
973/// Get the best matching graphics context depending on values.
974/// If rw is false only a readonly, not modifiable graphics context
975/// is returned. If rw is true a new modifiable graphics context is
976/// returned.
977
979{
980 TGGC *gc, *best_match = 0;
983
984 if (!values)
985 rw = kTRUE;
986
987 if (!rw) {
988
989 // First, try to find an exact matching GC.
990 // If no one found, then use the closest one.
991
992 TIter next(fList);
993
994 while ((gc = (TGGC *) next())) {
995 matching_bits = MatchGC(gc, values);
998 best_match = gc;
999 if ((gc->fValues.fMask & values->fMask) == values->fMask) {
1000 exact = kTRUE;
1001 break;
1002 }
1003 }
1004 }
1005
1006 if (best_match) {
1007 if (gDebug > 0)
1008 Printf("<TGGCPool::GetGC>: %smatching GC found\n", exact ? "exact " : "");
1009 best_match->AddReference();
1010 if (!exact) {
1011 // add missing values to the best_match'ing GC...
1012 UpdateGC(best_match, values);
1013 }
1014 return best_match;
1015 }
1016 }
1017
1018 gc = new TGGC(values, kTRUE);
1019
1020 fList->Add(gc);
1021
1022 return gc;
1023}
1024
1025////////////////////////////////////////////////////////////////////////////////
1026/// Try to find matching graphics context. On success returns the amount
1027/// of matching bits (which may be zero if masks have no common bits),
1028/// -1 on failure (when there are common bits but not a single match).
1029
1031{
1033 Int_t matching_bits = -1;
1034 Bool_t match = kFALSE;
1035 const GCValues_t *gcv = &gc->fValues;
1036
1037 common_bits = values->fMask & gcv->fMask;
1038
1039 if (common_bits == 0) return 0; // no common bits, a possible
1040 // candidate anyway.
1041
1042 // Careful, check first the tile and stipple mask bits, as these
1043 // influence nearly all other GC functions... (do the same for
1044 // some other such bits as GCFunction, etc...). Perhaps we should
1045 // allow only exact GC matches.
1046
1047 if (gcv->fMask & kGCTile)
1048 if ((gcv->fTile != kNone) && !(values->fMask & kGCTile)) return -1;
1049 if (values->fMask & kGCTile)
1050 if ((values->fTile != kNone) && !(gcv->fMask & kGCTile)) return -1;
1051 if (gcv->fMask & kGCStipple)
1052 if ((gcv->fStipple != kNone) && !(values->fMask & kGCStipple)) return -1;
1053 if (values->fMask & kGCStipple)
1054 if ((values->fStipple != kNone) && !(gcv->fMask & kGCStipple)) return -1;
1055
1056 for (bit = 1; bit <= common_bits; bit <<= 1) {
1057 switch (bit & common_bits) {
1058 default:
1059 case 0:
1060 continue;
1061 case kGCFunction:
1062 match = (values->fFunction == gcv->fFunction);
1063 break;
1064 case kGCPlaneMask:
1065 match = (values->fPlaneMask == gcv->fPlaneMask);
1066 break;
1067 case kGCForeground:
1068 match = (values->fForeground == gcv->fForeground);
1069 break;
1070 case kGCBackground:
1071 match = (values->fBackground == gcv->fBackground);
1072 break;
1073 case kGCLineWidth:
1074 match = (values->fLineWidth == gcv->fLineWidth);
1075 break;
1076 case kGCLineStyle:
1077 match = (values->fLineStyle == gcv->fLineStyle);
1078 break;
1079 case kGCCapStyle:
1080 match = (values->fCapStyle == gcv->fCapStyle);
1081 break;
1082 case kGCJoinStyle:
1083 match = (values->fJoinStyle == gcv->fJoinStyle);
1084 break;
1085 case kGCFillStyle:
1086 match = (values->fFillStyle == gcv->fFillStyle);
1087 break;
1088 case kGCFillRule:
1089 match = (values->fFillRule == gcv->fFillRule);
1090 break;
1091 case kGCTile:
1092 match = (values->fTile == gcv->fTile);
1093 break;
1094 case kGCStipple:
1095 match = (values->fStipple == gcv->fStipple);
1096 break;
1097 case kGCTileStipXOrigin:
1098 match = (values->fTsXOrigin == gcv->fTsXOrigin);
1099 break;
1100 case kGCTileStipYOrigin:
1101 match = (values->fTsYOrigin == gcv->fTsYOrigin);
1102 break;
1103 case kGCFont:
1104 match = (values->fFont == gcv->fFont);
1105 break;
1106 case kGCSubwindowMode:
1107 match = (values->fSubwindowMode == gcv->fSubwindowMode);
1108 break;
1110 match = (values->fGraphicsExposures == gcv->fGraphicsExposures);
1111 break;
1112 case kGCClipXOrigin:
1113 match = (values->fClipXOrigin == gcv->fClipXOrigin);
1114 break;
1115 case kGCClipYOrigin:
1116 match = (values->fClipYOrigin == gcv->fClipYOrigin);
1117 break;
1118 case kGCClipMask:
1119 match = (values->fClipMask == gcv->fClipMask);
1120 break;
1121 case kGCDashOffset:
1122 match = (values->fDashOffset == gcv->fDashOffset);
1123 break;
1124 case kGCDashList:
1125 if (values->fDashLen == gcv->fDashLen)
1126 match = (strncmp(values->fDashes, gcv->fDashes, gcv->fDashLen) == 0);
1127 break;
1128 case kGCArcMode:
1129 match = (values->fArcMode == gcv->fArcMode);
1130 break;
1131 }
1132 if (!match)
1133 return -1;
1134 matching_bits++;
1135 match = kFALSE;
1136 }
1137
1138 return matching_bits;
1139}
1140
1141////////////////////////////////////////////////////////////////////////////////
1142/// Update graphics context with the values spcified in values->fMask.
1143
1145{
1146 gc->SetAttributes(values);
1147}
1148
1149////////////////////////////////////////////////////////////////////////////////
1150/// List all graphics contexts in the pool.
1151
1153{
1154 fList->Print();
1155}
const Mask_t kGCCapStyle
Definition GuiTypes.h:292
const Mask_t kGCArcMode
Definition GuiTypes.h:308
const Mask_t kGCDashOffset
Definition GuiTypes.h:306
const Mask_t kGCBackground
Definition GuiTypes.h:289
const Mask_t kGCForeground
Definition GuiTypes.h:288
const Mask_t kGCLineStyle
Definition GuiTypes.h:291
const Mask_t kGCSubwindowMode
Definition GuiTypes.h:301
const Mask_t kGCLineWidth
Definition GuiTypes.h:290
Handle_t Pixmap_t
Pixmap handle.
Definition GuiTypes.h:30
const Mask_t kGCTile
Definition GuiTypes.h:296
const Mask_t kGCClipXOrigin
Definition GuiTypes.h:303
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Definition GuiTypes.h:35
const Mask_t kGCDashList
Definition GuiTypes.h:307
const Mask_t kGCFillStyle
Definition GuiTypes.h:294
const Mask_t kGCJoinStyle
Definition GuiTypes.h:293
const Mask_t kGCFunction
Definition GuiTypes.h:286
EGraphicsFunction
Definition GuiTypes.h:67
@ kGXorReverse
src OR NOT dst
Definition GuiTypes.h:79
@ kGXnand
NOT src OR NOT dst.
Definition GuiTypes.h:82
@ kGXandReverse
src AND NOT dst
Definition GuiTypes.h:70
@ kGXor
src OR dst
Definition GuiTypes.h:75
@ kGXcopy
src
Definition GuiTypes.h:71
@ kGXorInverted
NOT src OR dst.
Definition GuiTypes.h:81
@ kGXandInverted
NOT src AND dst.
Definition GuiTypes.h:72
@ kGXequiv
NOT src XOR dst.
Definition GuiTypes.h:77
@ kGXset
1
Definition GuiTypes.h:83
@ kGXnor
NOT src AND NOT dst.
Definition GuiTypes.h:76
@ kGXnoop
dst
Definition GuiTypes.h:73
@ kGXinvert
NOT dst.
Definition GuiTypes.h:78
@ kGXxor
src XOR dst
Definition GuiTypes.h:74
@ kGXand
src AND dst
Definition GuiTypes.h:69
@ kGXclear
0
Definition GuiTypes.h:68
@ kGXcopyInverted
NOT src.
Definition GuiTypes.h:80
Handle_t GContext_t
Graphics context handle.
Definition GuiTypes.h:38
const Mask_t kGCTileStipXOrigin
Definition GuiTypes.h:298
const Mask_t kGCFont
Definition GuiTypes.h:300
const Handle_t kNone
Definition GuiTypes.h:88
@ kEvenOddRule
Definition GuiTypes.h:52
@ kArcPieSlice
Definition GuiTypes.h:54
@ kCapNotLast
Definition GuiTypes.h:49
@ kCapProjecting
Definition GuiTypes.h:49
@ kWindingRule
Definition GuiTypes.h:52
@ kFillOpaqueStippled
Definition GuiTypes.h:51
@ kClipByChildren
Definition GuiTypes.h:53
@ kLineDoubleDash
Definition GuiTypes.h:48
@ kCapButt
Definition GuiTypes.h:49
@ kCapRound
Definition GuiTypes.h:49
@ kJoinBevel
Definition GuiTypes.h:50
@ kIncludeInferiors
Definition GuiTypes.h:53
@ kFillStippled
Definition GuiTypes.h:51
@ kFillSolid
Definition GuiTypes.h:51
@ kLineSolid
Definition GuiTypes.h:48
@ kJoinRound
Definition GuiTypes.h:50
@ kJoinMiter
Definition GuiTypes.h:50
@ kLineOnOffDash
Definition GuiTypes.h:48
@ kArcChord
Definition GuiTypes.h:54
@ kFillTiled
Definition GuiTypes.h:51
const Mask_t kGCFillRule
Definition GuiTypes.h:295
const Mask_t kGCPlaneMask
Definition GuiTypes.h:287
const Mask_t kGCStipple
Definition GuiTypes.h:297
const Mask_t kGCGraphicsExposures
Definition GuiTypes.h:302
const Mask_t kGCClipYOrigin
Definition GuiTypes.h:304
const Mask_t kGCClipMask
Definition GuiTypes.h:305
const Mask_t kGCTileStipYOrigin
Definition GuiTypes.h:299
#define g(i)
Definition RSha256.hxx:105
unsigned long ULong_t
Definition RtypesCore.h:55
long Long_t
Definition RtypesCore.h:54
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:374
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define gClient
Definition TGClient.h:157
Option_t Option_t option
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 mask
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 UChar_t len
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 gval
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
Int_t gDebug
Definition TROOT.cxx:597
#define gROOT
Definition TROOT.h:406
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2503
#define gVirtualX
Definition TVirtualX.h:337
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
Definition TColor.cxx:2543
Window client.
Definition TGClient.h:37
THashTable * fList
Definition TGGC.h:108
void Print(Option_t *option="") const override
List all graphics contexts in the pool.
Definition TGGC.cxx:1152
Int_t MatchGC(const TGGC *gc, GCValues_t *values)
Try to find matching graphics context.
Definition TGGC.cxx:1030
~TGGCPool() override
Delete graphics context pool.
Definition TGGC.cxx:886
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
Definition TGGC.cxx:978
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
Definition TGGC.cxx:909
friend class TGGC
Definition TGGC.h:105
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
Definition TGGC.cxx:942
void ForceFreeGC(const TGGC *gc)
Force remove graphics context from list. Is only called via ~TGGC().
Definition TGGC.cxx:894
TGGCPool(const TGGCPool &gp)
Definition TGGC.h:115
void UpdateGC(TGGC *gc, GCValues_t *values)
Update graphics context with the values spcified in values->fMask.
Definition TGGC.cxx:1144
Encapsulate a graphics context used in the low level graphics.
Definition TGGC.h:22
Pixmap_t GetTile() const
Definition TGGC.h:77
void SetArcMode(Int_t v)
Set arc mode (kArcChord, kArcPieSlice).
Definition TGGC.cxx:503
Int_t GetTileStipYOrigin() const
Definition TGGC.h:80
TGGC(GCValues_t *values, Bool_t calledByGCPool)
Create a graphics context (only called via TGGCPool::GetGC()).
Definition TGGC.cxx:38
Int_t GetJoinStyle() const
Definition TGGC.h:88
Bool_t GetGraphicsExposures() const
Definition TGGC.h:83
Int_t GetSubwindowMode() const
Definition TGGC.h:81
Int_t GetFillStyle() const
Definition TGGC.h:89
void SetLineWidth(Int_t v)
Set line width.
Definition TGGC.cxx:300
ULong_t GetPlaneMask() const
Definition TGGC.h:72
Int_t GetDashLen() const
Definition TGGC.h:92
void SetFont(FontH_t v)
Set font.
Definition TGGC.cxx:411
void SetPlaneMask(ULong_t v)
Set plane mask.
Definition TGGC.cxx:267
TGGC & operator=(const TGGC &rhs)
Graphics context assignment operator.
Definition TGGC.cxx:115
GContext_t fContext
graphics context handle
Definition TGGC.h:28
void SetTileStipYOrigin(Int_t v)
Y offset for tile or stipple operations.
Definition TGGC.cxx:400
Pixmap_t GetClipMask() const
Definition TGGC.h:86
Int_t GetClipXOrigin() const
Definition TGGC.h:84
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save graphics context info as a C++ statement(s) on output stream out.
Definition TGGC.cxx:627
void SetFillStyle(Int_t v)
Set fill style (kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled).
Definition TGGC.cxx:345
Pixel_t GetForeground() const
Definition TGGC.h:73
Int_t GetFillRule() const
Definition TGGC.h:90
GCValues_t fValues
graphics context values + mask
Definition TGGC.h:27
void SetCapStyle(Int_t v)
Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).
Definition TGGC.cxx:322
~TGGC() override
Delete graphics context.
Definition TGGC.cxx:103
const char * GetDashes() const
Definition TGGC.h:93
Int_t GetTileStipXOrigin() const
Definition TGGC.h:79
void SetForeground(Pixel_t v)
Set foreground color.
Definition TGGC.cxx:278
Int_t GetLineStyle() const
Definition TGGC.h:76
void SetClipMask(Pixmap_t v)
Bitmap for clipping.
Definition TGGC.cxx:466
void SetFillRule(Int_t v)
Set fill rule (kEvenOddRule, kWindingRule).
Definition TGGC.cxx:356
GContext_t operator()() const
Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0).
Definition TGGC.cxx:138
void SetDashOffset(Int_t v)
Patterned/dashed line offset.
Definition TGGC.cxx:477
void SetTileStipXOrigin(Int_t v)
X offset for tile or stipple operations.
Definition TGGC.cxx:389
void SetAttributes(GCValues_t *values)
Set attributes as specified in the values structure.
Definition TGGC.cxx:235
void SetDashList(const char v[], Int_t len)
Set dash pattern. First use SetDashOffset() if not 0.
Definition TGGC.cxx:488
EGraphicsFunction GetFunction() const
Definition TGGC.h:71
static TClass * Class()
void SetJoinStyle(Int_t v)
Set line join style (kJoinMiter, kJoinRound, kJoinBevel).
Definition TGGC.cxx:333
void SetClipXOrigin(Int_t v)
X origin for clipping.
Definition TGGC.cxx:444
Int_t GetClipYOrigin() const
Definition TGGC.h:85
Pixel_t GetBackground() const
Definition TGGC.h:74
void SetTile(Pixmap_t v)
Set tile pixmap for tiling operations.
Definition TGGC.cxx:367
void SetClipYOrigin(Int_t v)
Y origin for clipping.
Definition TGGC.cxx:455
void Print(Option_t *option="") const override
Print graphics contexts info.
Definition TGGC.cxx:514
void UpdateValues(GCValues_t *v)
Update values + mask.
Definition TGGC.cxx:146
void SetBackground(Pixel_t v)
Set background color.
Definition TGGC.cxx:289
void SetFunction(EGraphicsFunction v)
Set graphics context drawing function.
Definition TGGC.cxx:256
void SetStipple(Pixmap_t v)
Set 1 plane pixmap for stippling.
Definition TGGC.cxx:378
Mask_t GetMask() const
Definition TGGC.h:70
Pixmap_t GetStipple() const
Definition TGGC.h:78
Int_t GetLineWidth() const
Definition TGGC.h:75
void SetGraphicsExposures(Bool_t v)
True if graphics exposure should be generated.
Definition TGGC.cxx:433
void SetLineStyle(Int_t v)
Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).
Definition TGGC.cxx:311
Int_t GetDashOffset() const
Definition TGGC.h:91
Int_t GetCapStyle() const
Definition TGGC.h:87
Int_t GetArcMode() const
Definition TGGC.h:94
TString GetMaskString() const
Returns GC mask as a string - used in SavePrimitive().
Definition TGGC.cxx:523
void SetSubwindowMode(Int_t v)
Set sub window mode (kClipByChildren, kIncludeInferiors).
Definition TGGC.cxx:422
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
THashTable implements a hash table to store TObject's.
Definition THashTable.h:35
void Add(TObject *obj) override
Add object to the hash table.
TObject * Remove(TObject *obj) override
Remove object from the hashtable.
TObject * FindObject(const char *name) const override
Find object using its name.
void Print(Option_t *option, Int_t recurse) const override
Print the collection header and its elements.
Mother of all ROOT objects.
Definition TObject.h:41
TObject & operator=(const TObject &rhs)
TObject assignment operator.
Definition TObject.h:302
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:1057
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1071
Definitions for TRefCnt, base class for reference counted objects.
Definition TRefCnt.h:27
void SetRefCount(UInt_t r)
Definition TRefCnt.h:39
UInt_t References() const
Definition TRefCnt.h:38
Basic string class.
Definition TString.h:139
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2378
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Definition TMathBase.h:198
Graphics context structure.
Definition GuiTypes.h:224
ULong_t fBackground
background pixel
Definition GuiTypes.h:228
Int_t fFillRule
kEvenOddRule, kWindingRule
Definition GuiTypes.h:236
Pixmap_t fClipMask
bitmap clipping; other calls for rects
Definition GuiTypes.h:247
Int_t fDashOffset
patterned/dashed line information
Definition GuiTypes.h:248
Int_t fClipYOrigin
Definition GuiTypes.h:246
Int_t fClipXOrigin
origin for clipping
Definition GuiTypes.h:245
Int_t fLineWidth
line width
Definition GuiTypes.h:229
Pixmap_t fStipple
stipple 1 plane pixmap for stippling
Definition GuiTypes.h:239
Mask_t fMask
bit mask specifying which fields are valid
Definition GuiTypes.h:251
Int_t fLineStyle
kLineSolid, kLineOnOffDash, kLineDoubleDash
Definition GuiTypes.h:230
Pixmap_t fTile
tile pixmap for tiling operations
Definition GuiTypes.h:238
Bool_t fGraphicsExposures
boolean, should exposures be generated
Definition GuiTypes.h:244
Int_t fJoinStyle
kJoinMiter, kJoinRound, kJoinBevel
Definition GuiTypes.h:233
Char_t fDashes[8]
dash pattern list (dash length per byte)
Definition GuiTypes.h:249
ULong_t fForeground
foreground pixel
Definition GuiTypes.h:227
ULong_t fPlaneMask
plane mask
Definition GuiTypes.h:226
Int_t fFillStyle
kFillSolid, kFillTiled, kFillStippled, kFillOpaeueStippled
Definition GuiTypes.h:234
FontH_t fFont
default text font for text operations
Definition GuiTypes.h:242
Int_t fTsXOrigin
offset for tile or stipple operations
Definition GuiTypes.h:240
EGraphicsFunction fFunction
logical operation
Definition GuiTypes.h:225
Int_t fDashLen
number of dashes in fDashes
Definition GuiTypes.h:250
Int_t fCapStyle
kCapNotLast, kCapButt, kCapRound, kCapProjecting
Definition GuiTypes.h:231
Int_t fArcMode
kArcChord, kArcPieSlice
Definition GuiTypes.h:237
Int_t fTsYOrigin
Definition GuiTypes.h:241
Int_t fSubwindowMode
kClipByChildren, kIncludeInferiors
Definition GuiTypes.h:243