Access RColor from drawable attributes.
Definition at line 33 of file RAttrColor.hxx.
Public Member Functions | |
void | Clear () |
Remove all values which can correspond to RColor value. | |
void | ClearAuto () |
Clear auto flag of the RAttrColor. | |
RColor | GetColor () const |
Extract RColor for given attribute. | |
std::string | GetHex () const |
Return color as hex string like 00FF00. | |
bool | IsAuto () const |
Returns true if color should get auto value when primitive drawing is performed. | |
RAttrColor & | operator= (const RColor &col) |
void | SetAuto (bool on=true) |
Set automatic mode for RAttrColor, will be assigned before primitive painted on the canvas. | |
RAttrColor & | SetColor (const RColor &col) |
Set r/g/b components of color as hex code, default for the color. | |
Public Member Functions inherited from ROOT::Experimental::RAttrBase | |
RAttrBase ()=default | |
virtual | ~RAttrBase ()=default |
Protected Member Functions | |
void | ClearAlpha () |
Remove color alpha value. | |
void | ClearHex () |
Remove color hex value. | |
void | ClearName () |
Clear color plain SVG name (if any) | |
RAttrMap | CollectDefaults () const override |
Provide possible attributes names and values. | |
std::string | GetAlphaHex () const |
Returns color alpha (opacity) as hex string like FF. | |
std::string | GetName () const |
Returns color as plain SVG name like "white" or "lightblue". | |
bool | HasAlpha () const |
Returns true if color alpha (opacity) was specified. | |
bool | HasHex () const |
Returns true if color hex value was specified. | |
bool | HasName () const |
Returns true if color name was specified. | |
void | SetAlpha (float alpha) |
Set color alpha (opacity) value - from 0 to 1. | |
void | SetAlphaHex (const std::string &val) |
Set color alpha (opacity) value as hex. | |
void | SetHex (const std::string &_hex) |
Set color as hex string like 00FF00. | |
void | SetName (const std::string &_name) |
Set color as plain SVG name like "white" or "lightblue". | |
Protected Member Functions inherited from ROOT::Experimental::RAttrBase | |
RAttrBase (const RAttrBase &src) | |
RAttrBase (RAttrBase *parent, const std::string &prefix) | |
RAttrBase (RDrawable *drawable, const std::string &prefix) | |
const Rec_t | AccessAttr (const std::string &name) const |
Find attributes container and full-qualified name for value. | |
const Val_t | AccessValue (const std::string &name, bool use_style=true) const |
Search value with given name in attributes. | |
void | AssignDrawable (RDrawable *drawable, const std::string &prefix) |
Return value from attributes container - no style or defaults are used. | |
void | AssignParent (RAttrBase *parent, const std::string &prefix) |
Assign parent object for this RAttrBase. | |
void | Clear () |
Clear all respective values from drawable. Only defaults can be used. | |
void | ClearValue (const std::string &name) |
Clear value if any with specified name. | |
void | CopyTo (RAttrBase &tgt, bool use_style=true) const |
Copy attributes into target object. | |
bool | CopyValue (const std::string &name, const RAttrMap::Value_t &value, bool check_type=true) |
Copy attributes from other object. | |
Rec_t | EnsureAttr (const std::string &name) |
Ensure attribute with give name exists - creates container for attributes if required. | |
template<typename RET_TYPE , typename MATCH_TYPE = void> | |
auto | Eval (const std::string &name, bool use_dflts=true) const |
Evaluate attribute value. | |
virtual const RAttrMap & | GetDefaults () const |
Return default values for attributes, empty for base class. | |
const std::string & | GetPrefix () const |
template<typename T > | |
T | GetValue (const std::string &name) const |
template<typename T = void> | |
bool | HasValue (const std::string &name, bool check_defaults=false) const |
bool | IsSame (const RAttrBase &src, bool use_style=true) const |
Check if all values which are evaluated in this object are exactly the same as in tgt object. | |
virtual bool | IsValue () const |
bool | IsValueEqual (const std::string &name, const RAttrMap::Value_t &value, bool use_style=false) const |
Check if provided value equal to attribute in the map. | |
void | MoveTo (RAttrBase &tgt) |
Move all fields into target object. | |
RAttrBase & | operator= (const RAttrBase &src) |
void | SetNoValue (const std::string &name) |
Set <NoValue> for attribute. | |
void | SetValue (const std::string &name, bool value) |
Set boolean value. | |
void | SetValue (const std::string &name, const RPadLength &value) |
Set PadLength value. | |
void | SetValue (const std::string &name, const std::string &value) |
Set string value. | |
void | SetValue (const std::string &name, double value) |
Set double value. | |
void | SetValue (const std::string &name, int value) |
Set integer value. | |
Private Member Functions | |
R__ATTR_CLASS (RAttrColor, "color") | |
Friends | |
bool | operator== (const RAttrColor &lhs, const RAttrColor &rhs) |
#include <ROOT/RAttrColor.hxx>
|
inline |
Remove all values which can correspond to RColor value.
Definition at line 110 of file RAttrColor.hxx.
|
inlineprotected |
Remove color alpha value.
Definition at line 76 of file RAttrColor.hxx.
|
inline |
Clear auto flag of the RAttrColor.
Definition at line 129 of file RAttrColor.hxx.
|
inlineprotected |
Remove color hex value.
Definition at line 58 of file RAttrColor.hxx.
|
inlineprotected |
Clear color plain SVG name (if any)
Definition at line 49 of file RAttrColor.hxx.
|
inlineoverrideprotectedvirtual |
Provide possible attributes names and values.
Reimplemented from ROOT::Experimental::RAttrBase.
Definition at line 40 of file RAttrColor.hxx.
|
inlineprotected |
Returns color alpha (opacity) as hex string like FF.
Default is empty
Definition at line 64 of file RAttrColor.hxx.
|
inline |
Extract RColor for given attribute.
Definition at line 96 of file RAttrColor.hxx.
|
inline |
Return color as hex string like 00FF00.
Definition at line 119 of file RAttrColor.hxx.
|
inlineprotected |
Returns color as plain SVG name like "white" or "lightblue".
Definition at line 46 of file RAttrColor.hxx.
|
inlineprotected |
Returns true if color alpha (opacity) was specified.
Definition at line 67 of file RAttrColor.hxx.
|
inlineprotected |
Returns true if color hex value was specified.
Definition at line 61 of file RAttrColor.hxx.
|
inlineprotected |
Returns true if color name was specified.
Definition at line 52 of file RAttrColor.hxx.
|
inline |
Returns true if color should get auto value when primitive drawing is performed.
Definition at line 123 of file RAttrColor.hxx.
|
inline |
Definition at line 135 of file RAttrColor.hxx.
|
private |
|
inlineprotected |
Set color alpha (opacity) value - from 0 to 1.
Definition at line 70 of file RAttrColor.hxx.
|
inlineprotected |
Set color alpha (opacity) value as hex.
Definition at line 73 of file RAttrColor.hxx.
Set automatic mode for RAttrColor, will be assigned before primitive painted on the canvas.
Definition at line 126 of file RAttrColor.hxx.
|
inline |
Set r/g/b components of color as hex code, default for the color.
Definition at line 80 of file RAttrColor.hxx.
|
inlineprotected |
Set color as hex string like 00FF00.
Definition at line 55 of file RAttrColor.hxx.
|
inlineprotected |
Set color as plain SVG name like "white" or "lightblue".
Clears RGB component before
Definition at line 43 of file RAttrColor.hxx.
|
friend |
Definition at line 132 of file RAttrColor.hxx.