|
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_HELPER_H_
2 #define GENESIS_UTILS_FORMATS_SVG_HELPER_H_
102 explicit SvgMargin(
double top_bottom,
double right_left )
103 :
SvgMargin( top_bottom, right_left, top_bottom, right_left )
225 return "<!-- " + content +
" -->";
228 template<
typename T >
230 std::string
const& name,
232 std::string
const& unit =
""
234 std::stringstream ss;
235 ss <<
" " << name <<
"=\"" << value << unit <<
"\"";
240 std::string
const& media_type,
241 std::string
const& content,
242 bool encode_base64 =
false
244 return "data:" + media_type + (
266 double center_x,
double center_y,
double radius,
267 double start_angle,
double end_angle,
275 std::vector<SvgPoint>
const& points
282 std::vector<SvgPoint>
const& points,
283 SvgTransform
const& transform
300 #endif // include guard
void swap(Sample &lhs, Sample &rhs)
std::string svg_data_uri(std::string const &media_type, std::string const &content, bool encode_base64=false)
static SvgBox combine(SvgBox const &lhs, SvgBox const &rhs)
SvgMargin(double top, double right_left, double bottom)
std::string svg_comment(std::string const &content)
std::string base64_encode(std::vector< std::uint8_t > const &input, size_t line_length)
std::string svg_arc(double center_x, double center_y, double radius, double start_angle, double end_angle, bool wedge)
Create an arc to use in an SvgPath.
SvgBox(SvgPoint top_left_v, double width, double height)
SvgMargin(double top, double right, double bottom, double left)
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
std::string svg_attribute(std::string const &name, T const &value, std::string const &unit="")
SvgPoint operator+(SvgPoint const &other) const
SvgBox svg_bounding_box(std::vector< SvgPoint > const &points)
Compute the bounding box of a set of points.
SvgSize(double width=0.0, double height=0.0)
SvgMargin(double top_bottom, double right_left)
SvgBox(SvgPoint top_left, SvgPoint bottom_right)
SvgPoint(double x=0.0, double y=0.0)