|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file.
61 for(
auto const& elem : content_ ) {
78 out <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
80 out <<
svg_attribute(
"xmlns",
"http://www.w3.org/2000/svg" );
81 out <<
svg_attribute(
"xmlns:xlink",
"http://www.w3.org/1999/xlink" );
91 out << overflow_to_string(
overflow );
105 if( !
defs.empty() ) {
107 for(
auto const& def :
defs ) {
135 for(
auto const& elem : content_ ) {
136 elem.write( out, 2, options );
153 auto& os = target->ostream();
159 content_.push_back(
object );
165 content_.push_back( std::move(
object ));
171 return add(
object );
176 return add( std::move(
object ));
201 return std::string();
213 throw std::invalid_argument(
214 "Invalid Svg attribute Overflow for Svg Document."
std::string genesis_url()
Return the URL of the genesis home page.
static SvgBox combine(SvgBox const &lhs, SvgBox const &rhs)
std::string current_date()
Returns the current date as a string in the format "2014-12-31".
Provides functions for date and time access.
std::string svg_comment(std::string const &content)
Some stuff that is totally not imporatant, but nice.
std::string current_time()
Returns the current time as a string in the format "13:37:42".
void write(std::ostream &out) const
Write the SvgDocument to an output stream.
static std::string indentation_string
Provides some commonly used string utility functions.
self_type & operator<<(SvgObject const &object)
Shortcut operator for add(), which allows an even more fluent interface.
self_type & add(SvgObject const &object)
Add an SvgObject to the document.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Color operators and functions.
std::string svg_attribute(std::string const &name, T const &value, std::string const &unit="")
std::vector< SvgDefinitions > defs
SvgBox bounding_box() const
std::string genesis_version()
Return the current genesis version.
static Options & get()
Returns a single instance of this class.
std::string color_to_hex(Color const &c, std::string const &prefix, bool uppercase, bool with_alpha)
Return a hex string representation of a Color in the format "#003366[ff]".