|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_FORMATS_SVG_GROUP_H_
2 #define GENESIS_UTILS_FORMATS_SVG_GROUP_H_
41 #include <unordered_map>
107 hyperlink_ = std::unordered_map<std::string, std::string>{{
"href", value }};
120 if( values.count(
"href" ) == 0 ) {
121 throw std::invalid_argument(
122 "Cannot set an SVG Group hyperlink without the `href` tag."
140 operator bool()
const
167 #endif // include guard
std::string indent(std::string const &text, std::string const &indentation)
Indent each line of text with indentation and return the result.
std::vector< SvgObject > content_
std::unordered_map< std::string, std::string > hyperlink_
Provides some valuable additions to STD.
self_type & set_hyperlink(std::unordered_map< std::string, std::string > const &values)
Tweak to allow making parts of an image cickable.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
SvgGroup & operator=(SvgGroup const &)=default
SvgBox bounding_box() const
self_type & add(SvgObject const &object)
Add an SvgObject to the document.
self_type & operator<<(SvgObject const &object)
Shortcut operator for add(), which allows an even more fluent interface.
self_type & set_hyperlink(std::string const &value)
Simple tweak to allow making parts of an image clickable.
void write(std::ostream &out, size_t indent=0, SvgDrawingOptions const &options=SvgDrawingOptions()) const
self_type & reverse()
Reverse the order to the stored SvgObjects.