19#ifndef MiL_SVG_RENDER_RADIAL_ARC_H
20#define MiL_SVG_RENDER_RADIAL_ARC_H 1
43 for (
const auto& key: matches)
45 id_value_umap::iterator iter = ivm.find(key);
46 if (iter != ivm.end())
49 foundmap.insert(*iter);
68 vimm.insert(make_pair(i, s));
85 const double angled =
get_angle(pvalue, pmax);
112 const int radius,
bool rotatep)
116 for (
const auto& v : ivm)
118 string pname(v.first);
138 const double angled =
get_angle(pvalue, pmax);
163 const int radius,
const int rspace)
177 for (
const auto& v : uvalues)
180 auto irange = uvaluemm.equal_range(v);
181 auto ibegin = irange.first;
182 auto iend = irange.second;
184 for (
auto i = ibegin; i != iend; ++i)
185 ids.push_back(i->second);
void append_ids_at(svg_element &obj, const typography &typo, const strings &ids, const double angled, const point_2t origin, double r)
Concatenate ids onto one line.
std::unordered_multimap< value_type, string > value_id_ummap
void radial_text_r(svg_element &obj, string text, const typography &typo, const int r, const point_2t origin, const double deg, const bool roriginp=false)
std::unordered_map< string, value_type > id_value_umap
Hash multimap of unique value to (perhaps multiple) unique ids. Use this form for sorting by value.
ssize_type & get_label_spaces()
Get the label space. Value -> Name, as a string where value has labelspaces of fill NB: Should be the...
double get_angle(ssize_type pvalue, ssize_type pmax)
Transform a value on a range to an angle on the radial range.
void radiate_id_at_value(svg_element &obj, const point_2t origin, const typography &typo, string pname, ssize_type pvalue, ssize_type pmax, double r, bool rotatep)
id_value_umap remove_matches_id_value_map(id_value_umap &ivm, const strings &matches)
Remove all from map that match the input (matches) strings. Return found match entries.
string make_label_for_value(string pname, ssize_type pvalue, const uint valuewidth=9)
Make radial labels.
std::set< value_type > value_set
long long value_type
Hash map of unique id to (not necessarily) unique value. Use this for sorting by id.
void direction_arc_at(svg_element &obj, const point_2t origin, const double rr, svg::style s, const double spacer=10)
Arc + arrow glyph that traces path of start to finish trajectory.
svg_element radiate_ids_per_value_on_arc(svg_element &obj, const point_2t origin, const typography &typo, const id_value_umap &ivm, const ssize_type value_max, const int radius, bool rotatep)
svg_element radiate_ids_per_uvalue_on_arc(svg_element &obj, const point_2t origin, const typography &typo, const id_value_umap &ivm, const ssize_type value_max, const int radius, const int rspace)
std::tuple< space_type, space_type > point_2t
Point (x,y) in 2D space.
value_id_ummap to_value_id_mmap(const id_value_umap &ivm, value_set &uniquev)
Convert id_value_umap to value_id_mmap + set of unique values.
std::vector< string > strings
void radiate_ids_at_uvalue(svg_element &obj, const point_2t origin, const typography &typo, const strings &ids, ssize_type pvalue, ssize_type pmax, double r, double rspace)
Map ids with one value to a point cluster radiating out from a center.
void sort_strings_by_size(strings &ids)
Sort vectors of strings to largest length string first. (Or use set<>).
Datum consolidating style preferences.