Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPadPainterBase.cxx
Go to the documentation of this file.
1// @(#)root/gpad:$Id$
2// Author: Sergey Linev 17/04/2026
3
4/*************************************************************************
5 * Copyright (C) 1995-2026, 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#include "TPadPainterBase.h"
13#include "TColor.h"
14
15
16/** \class TPadPainterBase
17\ingroup gpad
18
19Extends TVirtualPadPainter interface to simplify work with graphical attributes
20*/
21
22////////////////////////////////////////////////////////////////////////////////
23/// Returns fill attributes after modification
24/// Checks for special fill styles 4000 .. 4100
25
27{
28 Style_t style = GetAttFill().GetFillStyle();
29 Color_t color = GetAttFill().GetFillColor();
30
31 fFullyTransparent = (style == 4000) || (style == 0);
33 style = 0;
34 } else if ((style > 4000) && (style <= 4100)) {
35 if ((style < 4100) && with_transparency)
36 color = TColor::GetColorTransparent(color, (style - 4000) / 100.);
37 style = 1001;
38 }
39
40 return { color, style };
41}
short Style_t
Style number (short)
Definition RtypesCore.h:96
short Color_t
Color number (short)
Definition RtypesCore.h:99
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t style
Fill Area Attributes class.
Definition TAttFill.h:21
static Int_t GetColorTransparent(Int_t color, Float_t a)
Static function: Returns the transparent color number corresponding to n.
Definition TColor.cxx:2182
const TAttFill & GetAttFill() const override
Bool_t fFullyTransparent
if transformed fill attributes fully transparent
TAttFill GetAttFillInternal(Bool_t with_transparency)
Returns fill attributes after modification Checks for special fill styles 4000 .