Base class for anything that has attributes (e.g. SVG elements, CSS stylesheets)
More...
#include <svg.hpp>
Inherited by SVG::Element.
|
|
virtual void | set_attr_value (const std::string &key, const std::string &value) |
| |
|
virtual AttrSetter | make_attr_setter (const std::string &key) |
| |
|
SVGAttrib & | mutable_attrs () |
| |
Base class for anything that has attributes (e.g. SVG elements, CSS stylesheets)
◆ get_attr()
template<typename T >
| std::enable_if< detail::is_numeric_attr_type< T >::value, T >::type SVG::AttributeMap::get_attr |
( |
const std::string & |
key, |
|
|
T |
fallback |
|
) |
| const |
|
inline |
Return a numeric attribute value, or fallback when unset or not parseable as a number.
◆ set_attr() [1/4]
template<>
| AttributeMap & SVG::AttributeMap::set_attr |
( |
const std::string |
key, |
|
|
const char * |
value |
|
) |
| |
|
inline |
Modify the attribute specified by key
◆ set_attr() [2/4]
| AttributeMap & SVG::AttributeMap::set_attr |
( |
const std::string |
key, |
|
|
const Color & |
value |
|
) |
| |
|
inline |
Set an attribute to a serialized color token.
◆ set_attr() [3/4]
template<>
| AttributeMap & SVG::AttributeMap::set_attr |
( |
const std::string |
key, |
|
|
const double |
value |
|
) |
| |
|
inline |
Modify the attribute specified by key
◆ set_attr() [4/4]
template<>
| AttributeMap & SVG::AttributeMap::set_attr |
( |
const std::string |
key, |
|
|
const std::string |
value |
|
) |
| |
|
inline |
Modify the attribute specified by key
◆ set_attrs() [1/2]
| AttributeMap & SVG::AttributeMap::set_attrs |
( |
const SVGAttrib & |
values | ) |
|
|
inline |
Set multiple attributes from an existing attribute map.
◆ set_attrs() [2/2]
| AttributeMap & SVG::AttributeMap::set_attrs |
( |
std::initializer_list< std::pair< std::string, std::string > > |
values | ) |
|
|
inline |
Set multiple attributes at once
The documentation for this class was generated from the following file: