izzi
SVG SUBSET C++ API
Loading...
Searching...
No Matches
svg Namespace Reference

Namespaces

namespace  constants
 

Classes

struct  area
 
struct  circle_element
 
struct  collection_rstate
 Collection derived states. More...
 
struct  color_qf
 
struct  color_qi
 Color quantified as integral RGB components in the range [0,255]. aka like Scalar in OpenCV. More...
 
struct  color_rstate
 Render settings for collections. More...
 
struct  defs_element
 
struct  desc_element
 
struct  element_base
 Abstract base class for all SVG Elements. More...
 
struct  filter_element
 
struct  foreign_element
 
struct  gradient_element
 
struct  graph_rstate
 Per-graph constants, metadata, text. More...
 
struct  group_element
 
struct  id_rstate
 Named render state. Datum to take id string and tie it to visual representation. More...
 
struct  iframe_element
 iframe HTML object embedded in SVG container. NB: HTML elements video/audio/iframe/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe More...
 
struct  image_element
 
struct  line_element
 
struct  linear_gradient
 Linear gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient. More...
 
struct  marker_element
 
struct  object_element
 HTML object embedded in SVG container. Unlike image_elements, object_elements are not locked down for scripting. NB: HTML elements video/audio/object/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object. More...
 
struct  path_element
 
struct  polyline_element
 
struct  radial_gradient
 Circular gradients https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient. More...
 
struct  rect_element
 
struct  render_state_base
 Settings for glyph, graphic, chart, and collection object render. More...
 
struct  script_element
 
class  string
 STL class. More...
 
struct  stroke_style
 Additional path/line/polyline stroke styles. More...
 
struct  style
 Datum consolidating style preferences. More...
 
struct  svg_element
 
struct  text_element
 
struct  text_path_element
 
struct  title_element
 
struct  transform
 Datum consolidating transform possibilities. https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform. More...
 
struct  typography
 
struct  video_element
 video HTML object embedded in SVG container. NB: HTML elements video/audio/iframe/canvas can be used w/o foreignElement. This approach uses HTML wrapped in foreign element. https://www.w3.org/TR/SVG2/embedded.html#HTMLElements https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video More...
 

Typedefs

using color_qfs = std::vector<color_qf>
 
using color_qis = std::vector<color_qi>
 Types for Color iteration and combinatorics.
 
using colorband = std::tuple<color, ushort>
 Specific regions of spectrum as bands of color. Each band has a starting hue and a number of known good samples. This is then used to seed a generator that computes more of similar hues.
 
using id_rstate_umap = std::unordered_map<string, id_rstate>
 
using id_value_umap = std::unordered_map<string, value_type>
 Hash multimap of unique value to (perhaps multiple) unique ids. Use this form for sorting by value.
 
using jsonstream = rj::PrettyWriter<rj::StringBuffer>
 Aliases/using.
 
template<typename T, std::size_t N>
using palette = std::array<T, N>
 Palette, finite set of colors used. Must end with color::none.
 
template<std::size_t N>
using palette_qf = palette<color_qf, N>
 
template<std::size_t N>
using palette_qi = palette<color_qi, N>
 
using point_2t = std::tuple<space_type, space_type>
 Point (x,y) in 2D space.
 
using point_2tn = std::tuple<point_2t, ssize_type>
 Point (x,y) in 2D space with weight n.
 
using space_type = double
 Base floating point type.
 
using srange = std::set<point_2t>
 Latitude and Longitude Ranges.
 
using ssize_type = int
 
using strings = std::vector<string>
 
using uint = unsigned int
 
using ulong = unsigned long
 
using ushort = unsigned short
 Base integer type: positive and negative, signed integral value.
 
using value_id_ummap = std::unordered_multimap<value_type, string>
 
using value_set = std::set<value_type>
 
using value_type = long long
 Hash map of unique id to (not necessarily) unique value. Use this for sorting by id.
 
using vrange = std::vector<point_2t>
 
using vspace = std::vector<double>
 Split range, so one dimension of (x,y) cartesian plane.
 
using vstrings = strings
 
using vvranges = std::vector<vrange>
 
using vvstrings = std::vector<strings>
 

Enumerations

enum class  color {
  none , white , black , gray10 , gray20 , gray25 , gray30 , gray40 ,
  gray50 , gray60 , gray75 , gray70 , gray80 , gray90 , wcag_lgray , wcag_gray ,
  wcag_dgray , kanzoiro , kohakuiro , kinsusutake , daylily , goldenyellow , hellayellow , antiquewhite ,
  lemonchiffon , goldenrod , navajowhite , ivory , gold , duboisyellow1 , duboisyellow2 , duboisyellow3 ,
  orange , darkorange , asamaorange , redorange , orangered , dutchorange , internationalorange , red ,
  foreigncrimson , ginshu , akabeni , akebonoiro , ochre , sohi , benikaba , benitobi ,
  ake , crimson , tomato , coral , salmon , duboisred1 , duboisred2 , duboisred3 ,
  duboisbrown1 , duboisbrown2 , duboisbrown3 , duboisbrown4 , duboisbrown5 , byakuroku , usumoegi , moegi ,
  hiwamoegi , midori , rokusho , aotakeiro , seiheki , seijiiro , yanagizome , green ,
  chartreuse , greenyellow , limegreen , springgreen , aquamarine , duboisgreen1 , duboisgreen2 , duboisgreen3 ,
  duboisgreen4 , duboisgreen5 , blue , ultramarine , shinbashiiro , hanada , ruriiro , bellflower ,
  navy , asagiiro , indigo , rurikon , asamablue , cyan , lightcyan , powderblue ,
  steelblue , cornflowerblue , deepskyblue , dodgerblue , lightblue , skyblue , lightskyblue , midnightblue ,
  mediumblue , royalblue , darkslateblue , slateblue , azure , crayolacerulean , duboisblue1 , duboisblue2 ,
  duboisblue3 , duboisblue4 , blueprintlight , blueprint , blueprintdark , wisteria , murasaki , ayameiro ,
  peony , futaai , benimidori , redwisteria , botan , kokimurasaki , usuiro , asamapink ,
  blueviolet , darkmagenta , darkviolet , thistle , plum , violet , magenta , dfuschia ,
  deeppink , hotpink , pink , kissmepink , palevioletred , mediumvioletred , lavender , orchid ,
  mediumorchid , darkestmagenta , mediumpurple , purple , dustyrose , atmosphericp , command , science ,
  engineering , last
}
 Color enumerated as types. More...
 
enum class  matrix_variant { centerweight , centerweightsvg , veronica , slim }
 Grid style mode. More...
 
enum class  scale {
  r5s , r4s , r3s , r2s , r1s , xxsmall , xsmall , small ,
  medium , baseline , large , xlarge , xxlarge , e1s , e2s , e3s ,
  e4s , e5s
}
 
enum class  select {
  none = 1u << 0 , cartography = 1u << 1 , image = 1u << 2 , raster = 1u << 3 , vector = 1u << 4 , blur = 1u << 5 , echo = 1u << 6 , text = 1u << 7 ,
  title = 1u << 8 , legend = 1u << 9 , axis = 1u << 10 , grid = 1u << 11 , linex = 1u << 12 , liney = 1u << 13 , ticks = 1u << 14 , tooltip = 1u << 15 ,
  telecom = 1u << 16 , tor = 1u << 17 , satellite = 1u << 18 , cable = 1u << 19 , glyph = 1u << 20 , svg = 1u << 21 , alt = 1u << 22 , background = 1u << 23 ,
  top = 1u << 24 , bottom = 1u << 25 , odd = 1u << 26 , even = 1u << 27 , all = 1u << 29 , _S_end = 1u << 30
}
 
enum class  unit {
  meter , m , centimeter , cm , millimeter , mm , inch , in ,
  pixel , px , point , pt
}
 Measurement abstraction for absolute (not relative) measurements. More...
 

Functions

auto & active_spectrum (const bool sortbyhuep=false)
 Oklab https://bottosson.github.io/posts/oklab/.
 
void add_to_id_rstate_cache (const string id, const style styl, const select vis)
 Add value to cache with base style of styl, colors klr, visibility vis.
 
double adjust_angle_at_orbit_for_distance (double r, double dist, const double minadjust=0.25)
 
double adjust_angle_rotation (const double dorig, const k::rrotation rot)
 Adjust angle above to CW/CCW orientation.
 
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.
 
color_qi average_color_qi (const color_qi &a, const color_qi &b)
 Average two colors, return the result.
 
strings blink_to_color_seq (const rect_element::data &dr, const color klr, size_t fps, double sec, double twhen, size_t nblinks, double blinksec)
 blink sequence of duration sec, given fps starts on background (backgf) at duration twhen blinks specific frame (blinkf) times (nblinks) for seconds (blinksec) can use with image behind
 
ulong cell_size_3x3_matrix (const area<> a, const uint n, const double margin)
 Cell size 3x3 for n items with margin spacing on either size.
 
constexpr double char_height_to_px (const uint sz)
 Approximate pixel height of type of point size @sz.
 
constexpr double char_width_to_px (const uint sz)
 Approximate pixel height of type of point size @sz.
 
void clear_select (select &a, const select &b)
 
color_qf::ftype color_qf_distance (const color_qf &k1, const color_qf &k2)
 
bool color_qf_lt (const color_qf &k1, const color_qf &k2)
 Forwarding function.
 
bool color_qf_lt_hue_v1 (const color_qf &k1, const color_qf &k2)
 Less than compare for color_qf.
 
bool color_qf_lt_hue_v2 (const color_qf &k1, const color_qf &k2)
 
bool color_qf_lt_v (const color_qf &k1, const color_qf &k2)
 Default compare distances from k1,k2 to black.
 
color_qi combine_color_qi (const color_qi &a, const double ad, const color_qi &b, const double bd)
 
void composite_bleed_areas (svg_element &obj, const svg::select slxt, const double bleedin, const double bleedxoffset=0)
 Composite frame on bleed. For printed objects with a center gutter, some intra-page adjustments are necessary.
 
string convert_8859_to_utf8 (string in)
 Convert from ISO-8859-1 encoding to UTF-8, required for XML.
 
string convert_to_utf8 (string in)
 
vrange deserialize_json_array_object_field_n (const string jdata, const string afield, const string field1, const string field2, const bool verbosep=true)
 Deserialize json array, extract specific fields from array objects, return as vec of point_2t.
 
rj::Document deserialize_json_string_to_dom (const string &json)
 Deserialize input string.
 
rj::Document deserialize_json_to_dom (const string input_file)
 Deserialize input file.
 
rj::Document deserialize_json_to_dom_array (const string input_file)
 Load JSON file to in-memory DOM array.
 
rj::Document deserialize_json_to_dom_object (const string input_file)
 Load JSON file to in-memory DOM.
 
bool detect_collision (const point_2t &p1, const int r1, const point_2t &p2, const int r2)
 
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.
 
void direction_arc_title_at (svg_element &obj, const point_2t origin, const int radius, const typography typo, const string title, const uint pcnt=30)
 Title on same arc.
 
svg_element display_color_qis (const auto &klrs, const area<> a, const typography &typobase)
 Make grid palette for display. NB.
 
space_type distance_cartesian (const point_2t &p1, const point_2t &p2)
 Find cartesian distance between two 2D points.
 
string dot_grid_seq (const rect_element::data &drin, const color klr, const rect_element::atype radius=80, const int maxwidth=8, const int maxheight=4, const rect_element::atype xstart=40, const rect_element::atype ystart=100)
 Randomly create grid of [maxwidth] x [maxheight] grid, and fill with dots.
 
string element_to_svg_insert (const string isvgpre)
 Import svg file, convert it to svg_element for insertion.
 
double extract_dom_value_to_double (const rj::Value &v)
 Extract from raw JSON value to double.
 
strings fade_from_color_seq (const rect_element::data &dr, const color klr, size_t fps=30, double sec=1.0, double minopac=0)
 Start rectangle as transparent, fade to color.
 
strings fade_to_color_seq (const rect_element::data &dr, const color klr, size_t fps=30, double sec=1.0, double maxopac=1.0)
 
string file_to_svg_insert (const string ifile)
 Import svg file, convert it to svg_element for insertion. ifile is a plain SVG file with a 1:1 aspect ratio.
 
vrange find_vrange_change_points (const vrange &vr)
 Simplify sorted vrange by removing interior duplicates.
 
void flip_select (select &a, const select &b)
 
double get_angle (ssize_type pvalue, ssize_type pmax)
 Transform a value on a range to an angle on the radial range.
 
point_2t get_circumference_point_d (const double ad, const double r, const point_2t origin)
 Angle in degrees.
 
point_2t get_circumference_point_r (const double angler, const double r, const point_2t origin)
 Angle in radians.
 
double & get_dpi ()
 Resolution of output display device.
 
const id_rstate get_id_rstate (const string id)
 Given identifier/name/id, get corresponding id_rstate from cache.
 
id_rstate_umapget_id_rstate_cache ()
 
ssize_typeget_label_spaces ()
 Get the label space. Value -> Name, as a string where value has labelspaces of fill NB: Should be the number of significant digits in pmax plus separators. So, 10 == 2, 100 == 3, 10k == 5 + 1.
 
int & get_min_ring_size ()
 The smallest (sattelite) radius size allowed in a kusama orbit.
 
double & get_min_satellite_distance ()
 The minimum distance between satellites in high orbit.
 
point_2tget_radial_range ()
 
color_rstateget_render_state ()
 Global state.
 
svg_element insert_svg_at (svg_element &obj, const string isvg, const point_2t origin, const double origsize, const double isize, const double angled=0, const style &styl=k::no_style)
 Embed svg in group element.
 
void kusama_collision_transforms (svg_element &obj, const point_2t origin, std::vector< ssize_type > &vuvalues, vvstrings &vids, const ssize_type value_max, const int radius, const int rspace, const int rstart, const typography &typo, const bool weighbyvaluep, const ssize_type threshold=1, const int startlenm=5)
 
void kusama_ids_at_uvalue (svg_element &obj, const point_2t origin, const strings &ids, const ssize_type v, const ssize_type value_max, const int radius, const int rspace, const int rstart, const int linelen, const typography &typo, const bool weighbyvaluep)
 Layer one value's glyphs and ids.
 
int kusama_ids_orbit_high (svg_element &obj, const point_2t origin, const strings &ids, const ssize_type v, const ssize_type value_max, const int radius, const int rspace, const int rstart, const int linelen, const typography &typo, const bool wbyvaluep, const bool satellitep=false)
 
void kusama_ids_orbit_low (svg_element &obj, const point_2t origin, const strings &ids, const ssize_type v, const ssize_type value_max, const int radius, const int rspace, const int rstart, const int linelen, const typography &typo, const bool wbyvaluep)
 
svg_element kusama_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, const bool weighbyvaluep=true, const bool collisionp=false, const bool sortstringsbysizep=false)
 
void make_1_channel_insert (svg_element &obj, string insert1)
 
void make_2_channel_insert (svg_element &obj, string insert1, string insert2)
 
circle_element make_circle (const point_2t origin, style s, const space_type r=4, const string xform="")
 Make circle element.
 
color_qis make_color_band (const colorband &cb, const ushort neededh)
 Forwarding function.
 
color_qis make_color_band_v1 (const colorband &cb, const ushort neededh, auto &spectrum)
 
color_qis make_color_band_v2 (const colorband &cb, const ushort neededh)
 Algorightm is HSV generation.
 
string make_crossed_lines (const point_2t origin, const style s, const double radius, const double tiltd=0.0)
 Crossed lines, no fill. X marks the ....
 
string make_label_for_value (string pname, ssize_type pvalue, const uint valuewidth=9)
 Make radial labels.
 
line_element make_line (const point_2t origin, const point_2t end, style s, const string dasharray="")
 Line primitive.
 
svg_element make_line_graph (const svg::area<> aplate, const vrange &points, const graph_rstate &gstate, const point_2t xrange, const point_2t yrange)
 Returns a svg_element with the chart and labels Assume: vgrange x axis is monotonically increasing.
 
svg_element make_line_graph_annotations (const area<> aplate, const vrange &points, const graph_rstate &gstate, const double xscalein=1, const double yscalein=1, const typography typo=k::apercu_typo)
 Axis Labels Axis X/Y Ticmarks X line increments.
 
string make_line_graph_markers_tips (const vrange &points, const vrange &cpoints, const graph_rstate &gstate, const double radius)
 Return set of paths corresponding to marker shapes with tooltips.
 
marker_element make_marker_circle (const std::string id, const area<> ma, const point_2t mcp, const uint radius, const style styl)
 
marker_element make_marker_element (const std::string id, const area<> ma, const point_2t mcp, const std::string raw)
 Base function for generating SVG markers in a defs section.
 
marker_element make_marker_rect (const std::string id, const area<> ma, const point_2t mcp, const style styl)
 
string make_marker_set_n (const double i)
 Create a set of markers bounded by a rectangle of size n.
 
marker_element make_marker_triangle (const std::string id, const area<> ma, const point_2t mcp, const uint radius, const style styl)
 
marker_element make_marker_x (const std::string id, const area<> ma, const point_2t mcp, const uint radius, const style styl)
 
void make_markers (svg_element &obj)
 Make black/white/wcag markers with sizes 4x4 and 2x2.
 
path_element make_path (const string &pathda, const style &styl, const string name="", const bool selfclosingtagp=true)
 Draw path given serialized path data. Assumes pinstripe, ie top and bottom line layers. top style defaults: fill opac(0), stroke opac(1), stroke sz 1 bottom style defaults: fill opac(0), stroke opac(1), stroke sz 1.25.
 
string make_path_arc_circumference (const point_2t &start, const point_2t &end, const space_type r, const int arcflag=0, const int sweepflag=1)
 Make path segment between two points on a circumference of radius r. Points like: get_circumference_point_d(zero_angle_north_cw(0), r, origin)
 
string make_path_arc_closed (const point_2t &origin, const double startd, const double endd, const space_type r, const int arcflag=0, const int sweepflag=0)
 Same but with degree range arguments instead of points. NB: Assumes appropriate zero_angle_north_cw/ccw adjustments on startd/endd.
 
string make_path_arc_closed (const point_2t &origin, const point_2t &start, const point_2t &end, const space_type r, const int arcflag=0, const int sweepflag=0)
 Make closed path between two points and the center of a circle of radius r. Points like: get_circumference_point_d(zero_angle_north_cw(0), r, origin)
 
path_element make_path_center_mark (const point_2t &origin, const style styl, const int len, const int width)
 Plus or x tilt mark as closed path that can be filled.
 
string make_path_data_from_points (const vrange &lpoints)
 Make single path segment.
 
path_element make_path_octogon (const point_2t origin, const style styl, const double r=4, const uint pointsn=8)
 Center an octogon at this point. radius 4 is pixels to draw out from center point. pointsn is number of points to draw (8 for octogon)
 
path_element make_path_triangle (const point_2t origin, const style styl, const double r=4, const double angle=120, const bool selfclosingtagp=true)
 Center a triangle at this point.
 
polyline_element make_polyline (const vrange &points, const style s, const stroke_style sstyle={ })
 Polyline primitive.
 
rect_element make_rect (const point_2t origin, const style s, const area<> a, const string filterstr="")
 Create rect_element at origin.
 
rect_element make_rect_centered (const point_2t origin, const style s, const area<> a, const string filterstr="")
 Create rect_element centered at origin.
 
svg_element make_svg_1_channel (const space_type deltax, const space_type deltay, const string &outbase)
 Take input size and make a one channel (single-image) SVG form.
 
svg_element make_svg_2_channel (const space_type deltax, const space_type deltay, const string &outbase)
 Take input size and make a two channel (single-image) SVG form.
 
string make_tspan_y_from_string_by_token (string s, uint xpos, const char token=' ')
 Make text span.
 
point_2t max_vrange (const vrange &points, const uint pown, const double xscale=1, const double yscale=1)
 Just the range info, none of the temporary objects.
 
point_2t max_vrange (vspace &xpoints, vspace &ypoints, const uint pown)
 For each dimension of vrnage, find min/max and return (xmax, ymax) NB: Assumes zero is min.
 
color_qf mutate_color_qf (const color_qf &k)
 Return a variant on saturation/value only.
 
vspace narrow_vspace (const vspace &points, uint pown)
 Truncate double to double with pown signifigant digits.
 
svg_element nest_inner_svg_element_centered (const svg_element &obj, const point_2t &p)
 Take.
 
color_qi next_color (const color_qi klr)
 Loop through color array starting at position c. Iff klr is not found, return color::none as the next color.
 
color_qi next_in_color_band (const colorband &cb, const ushort bandn=400)
 Flip through color band colors.
 
constexpr select operator& (select __a, select __b)
 
const selectoperator&= (select &__a, select __b)
 
bool operator< (const color_qf &c1, const color_qf &c2)
 
bool operator== (const color_qf &c1, const color_qf &c2)
 
bool operator== (const color_qi &c1, const color_qi &c2)
 
constexpr select operator^ (select __a, select __b)
 
const selectoperator^= (select &__a, select __b)
 
constexpr select operator| (select __a, select __b)
 
const selectoperator|= (select &__a, select __b)
 
constexpr select operator~ (select __a)
 
strings optical_sound_dots_seq (const rect_element::data &drin, const color klr, size_t fps=30, double sec=1.0, const int radius=80, const int maxw=8, const int maxh=4, const int xstart=40, const int ystart=100)
 
void paint_edges_with_char_index (svg_element &obj, const area<> a, const char firstc, const svg::color klr=color::duboisgreen2, const double rlen=24.0)
 Paint the edges of a physical page. Assumes page is square. /.
 
void place_ray_at_angle (svg_element &obj, const point_2t &origin, const point_2t &circump, const style &s, const string id="")
 
void point_2d_to_ray (svg_element &obj, double x, double y, style s, space_type r=4, const uint nrays=10)
 Lines radiating from center point (x,y).
 
void point_to_circle (svg_element &obj, const point_2t origin, style s, const space_type r=4, const string xform="")
 Draws a circle around a point (x,y), of style (s), of radius (r).
 
void point_to_crossed_lines (svg_element &obj, const point_2t origin, const style &styl, const int radius, const double tiltd=0.0)
 Point to center mark as crossed lines. Default is a plus sign at origin, but.
 
void point_to_octogon (svg_element &obj, const point_2t origin, const style s, const double r=4)
 Center an octogon at this point.
 
void point_to_rect (svg_element &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="")
 Rectangle at this point.
 
void point_to_rect_centered (svg_element &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="")
 Center a rectangle at this point.
 
void point_to_ring_halo (svg_element &obj, const point_2t origin, const space_type radius, const double blurspace, const svg::color klr, const svg::color fadeklr=color::none, const double opacity=1)
 Draws a ring centered at origin of radius r, with outer and inner radial gradient of blurspace in each direction. klr == fade from fadeklr == fade to. Background is transparent if none.
 
void point_to_triangle (svg_element &obj, const point_2t origin, const style s, const double r=4, const double angle=120)
 Center a triangle at this point.
 
void points_to_line (svg_element &obj, const style s, const point_2t origin, const point_2t end, const string dasharray="")
 Line between two points.
 
double pt_to_px (const uint i=1)
 Conversion between point size to pixels given dpi density.
 
void radial_text_ccw (svg_element &obj, string text, const typography &typo, const point_2t origin, const double deg)
 Text with typography, arranged ccw around points (x,y) on a circle.
 
void radial_text_ccw (svg_element &obj, string text, const typography &typo, const point_2t origin, const double deg, const point_2t rorigin)
 Text with typography, arranged ccw around points (x,y) on a circle.
 
void radial_text_cw (svg_element &obj, string text, const typography &typo, const point_2t origin, const double deg)
 Text with typography, arranged cw around points (x,y) on a circle.
 
void radial_text_cw (svg_element &obj, string text, const typography &typo, const point_2t origin, const double deg, const point_2t rorigin)
 Text with typography, arranged cw around points (x,y) on a circle.
 
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)
 
int radiate_glyph (svg_element &obj, const point_2t origin, const double angled, const id_rstate idst, const int kr, const int rspace, const int rstart)
 
int radiate_glyph_and_id (svg_element &obj, const point_2t origin, const double angled, const double kr, const int rspace, const int rstart, const string id, const typography &typo)
 
int radiate_glyph_and_id (svg_element &obj, const point_2t origin, const ssize_type v, const ssize_type value_max, const int radius, const int rspace, const int rstart, const string id, const typography &typo)
 Convenience function for above.
 
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)
 
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.
 
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)
 
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)
 
int radiate_line_and_value (svg_element &obj, const point_2t origin, const double angled, const ssize_type v, const int rspace, const int rstart, const int linelen, const typography &typo, const style styl={color::black, 1, color::black,.25, 1})
 
template<typename _Spectrm>
color_qi random_color (const _Spectrm &spectrm, const uint startoffset=0)
 
color_qi random_color (const uint startoffset=0)
 Random entry from array above.
 
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.
 
double scale_proportional_to_area (double radius, double weight)
 
double scale_proportional_to_weight (double radius, double weight)
 
double scale_value_on_range (const ssize_type value, const ssize_type min, const ssize_type max, const ssize_type nfloor, const ssize_type nceil)
 Scale value from min to max on range (nfloor, nceil).
 
int search_dom_for_int_field (const rj::Document &dom, const string finds)
 Search DOM for integer values.
 
string search_dom_for_string_field (const rj::Document &dom, const string finds)
 Search DOM for string literals.
 
void serialize_id_types_json (jsonstream &writer, const auto &ids, const string tag)
 Serialize set of id_type.
 
void set_label_spaces (ssize_type spaces)
 Set the number of label spaces.
 
int set_min_ring_size (const int sz)
 By observation, type size 12pt = 5, 6pt = 2.
 
double set_min_satellite_distance (const double kuse)
 By observation, 7pt = 5 minimum NB: Make sure distance is at least text height away for lowest values.
 
point_2t set_radial_range (const space_type rmin, const space_type rmax)
 Convenience for setting radial range.
 
void set_select (select &a, const select &b)
 Forwarding functions.
 
uint significant_digits_in (ssize_type maxval)
 The number of significant digits in.
 
void sized_text (svg_element &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty)
 Text at size.
 
void sized_text_r (svg_element &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty, const double deg)
 Text at size, with a transformation=rotation.
 
void sort_strings_by_size (strings &ids)
 Sort vectors of strings to largest length string first. (Or use set<>).
 
void splay_ids_after (svg_element &obj, const typography &typo, const strings &ids, const double angledo, const point_2t origin, double r, double rspace)
 Spread ids past the origin point, along circumference path.
 
void splay_ids_around (svg_element &obj, const typography &typo, const strings &ids, const double angled, const point_2t origin, double r, double rspace, const bool satellitep=false)
 Spread ids on either side of an origin point, along circumference path.
 
void splay_ids_stagger (svg_element &obj, const typography &typo, const strings &ids, const double angled, const point_2t origin, double r, double rspace)
 Spread ids after in stepping pattern outward.
 
void split_vrange (const vrange &cpoints, vspace &xpoints, vspace &ypoints, const double xscale=1, const double yscale=1)
 Decompose/split 2D ranges to 1D spaces, perhaps with scaling.
 
void stack_ids_at (svg_element &obj, const typography &typoo, const strings &ids, const double angled, const point_2t origin, double r, const double rdelta=10)
 Rotate and stack ids at origin point, extending radius for each from point of origin.
 
color_qi start_at_color (const color_qi klr)
 Start at specified color bar entry point.
 
void string_replace (std::string &target, const std::string &match, const std::string &replace)
 
text_element style_text (const string text, const point_2t origin, const typography typo)
 Text elemetn at.
 
void styled_text (svg_element &obj, const string text, const point_2t origin, const typography typo)
 Text at.
 
void styled_text (svg_element &obj, const string text, const point_2t origin, const typography typo, const string xform)
 Text at.
 
void styled_text_link (svg_element &obj, const string text, const point_2t origin, const typography typo, const string uri)
 XXX Text at.
 
void styled_text_r (svg_element &obj, const string text, const point_2t origin, const typography typo, const double deg)
 Text at.
 
void styled_text_r (svg_element &obj, const string text, const point_2t origin, const typography typo, const double deg, const point_2t rorigin)
 Text at.
 
strings swipe_left_seq (const rect_element::data &drin, const string imgf, const color klr=color::white, size_t fps=30, double sec=9)
 1 channel start with image, background color is klr each "frame" == string in returned strings has an image and a background
 
uint text_line_n (svg_element &obj, const point_2t origin, const string text, const svg::typography typo, const int sz, const uint maxlen)
 Text of maxlen length, overflow goes on line below.
 
uint text_line_n_r (svg_element &obj, const point_2t origin, const string text, const svg::typography typo, const uint sz, const uint maxlen, const uint lettingsz=0)
 Text of maxlen length rotated, overflow goes on line below.
 
point_2t to_point_in_1x8_matrix (const area<> a, const uint i, const double margin)
 For positioning a linear list of glyphs along a horizontal line. Assuming i is from find_id_index with tag, so is an offset starting at zero.
 
point_2t to_point_in_1xn_matrix (const area<> a, const uint n, const uint i, const double margin, const double y, const bool centeredp=false)
 For positioning a linear list of glyphs along a horizontal line.
 
point_2t to_point_in_2x4_matrix (const area<> a, const uint i, const double margin)
 
point_2t to_point_in_3x3_matrix (const area<> a, const uint i, const double margin, const matrix_variant vnt=matrix_variant::slim)
 
point_2t to_point_in_matrix (const area<> a, const uint i, const double margin)
 Default matrix position.
 
const std::string & to_string (const color e)
 Convert color to RGB color value string.
 
const std::string to_string (const color_qf klr)
 Convert color_qf to string.
 
const std::string to_string (const color_qi klr)
 Convert color_qi to string.
 
string to_string (const scale e)
 
const string to_string (const style &s)
 
const string to_string (const unit e)
 
string to_string (point_2t p)
 Convert point_2t to string.
 
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.
 
const id_rstate traverse_states (const strings &values)
 Roll through render states given in values squentially, index starts with zero.
 
vrange union_vrange (const vrange &r1, const vrange &r2)
 Union two ranges.
 
strings vertical_sync_roll_seq (const rect_element::data &drin, const color klr, size_t, double step=10, int blursz=200, int solidsz=133, double opac=0.6)
 Simulated vertical roll, with fades. r == frame size.
 
strings wink_to_color_seq (const rect_element::data &dr, const color klr, size_t fps, double sec, double twhen, double maxclose, double winksec)
 wink sequence of duration sec, given fps to color klr starts on background transparent, so can use with an image behind. at duration twhen winks specific rectangle (r) this much (maxclose) for seconds (winksec)
 
double zero_angle_north_ccw (double angled)
 Zero degrees is top, going clockwise (cw).
 
double zero_angle_north_cw (double angled)
 Zero degrees is top, going clockwise (cw).
 

Variables

constexpr colorband cband_b = std::make_tuple(color::blue, 34)
 
constexpr colorband cband_brown = std::make_tuple(color::duboisbrown5, 7)
 
constexpr colorband cband_bw = std::make_tuple(color::white, 2)
 Izzi palette-specific offsets for colorbands.
 
constexpr colorband cband_g = std::make_tuple(color::green, 21)
 
constexpr colorband cband_gray = std::make_tuple(color::white, 16)
 
constexpr colorband cband_o = std::make_tuple(color::orange, 10)
 
constexpr colorband cband_p = std::make_tuple(color::purple, 33)
 
constexpr colorband cband_r = std::make_tuple(color::red, 17)
 
constexpr colorband cband_y = std::make_tuple(color::hellayellow, 10)
 
static const palette_qi< 73 > ciecam02_palette
 
constexpr uint color_max_size = static_cast<uint>(color::last)
 Total number of enumerated colors.
 
static const palette_qi< 19 > colorbrewer2s3s_palette
 ColorBrewer 2.0 https://colorbrewer2.org.
 
static const palette_qi< 43 > colorbrewer2s7s_palette
 Single hue 7-class sequential, low to high.
 
static const palette_qi< 55 > colorbrewer2s9s_palette
 Single hue 9-class sequential, low to high.
 
static const palette_qi< color_max_size - 20 > izzi_hue_palette
 Only color no black and white or gray.
 
static const palette_qi< color_max_size - 4 > izzi_palette
 Default colors for izzi.
 
static const palette_qi< 118 > jp_palette
 Japan colors (118) https://en.wikipedia.org/wiki/Traditional_colors_of_Japan.
 
constexpr uint matrix_max_items = 8
 Maximum number of individual items to be placed in grid cells. A 1x4 grid can contain up to 4 items. A 2x4 grid can contain up to 8 items. A 3x3 grid can contain up to 9 items.
 

Detailed Description

Scalable Vector Graphics (SVG) namespace

Typedef Documentation

◆ color_qfs

using svg::color_qfs = std::vector<color_qf>

Definition at line 817 of file a60-svg-color.h.

◆ color_qis

using svg::color_qis = std::vector<color_qi>

Types for Color iteration and combinatorics.

Definition at line 816 of file a60-svg-color.h.

◆ colorband

using svg::colorband = std::tuple<color, ushort>

Specific regions of spectrum as bands of color. Each band has a starting hue and a number of known good samples. This is then used to seed a generator that computes more of similar hues.

Definition at line 32 of file a60-svg-color-band.h.

◆ id_rstate_umap

using svg::id_rstate_umap = std::unordered_map<string, id_rstate>

Definition at line 311 of file a60-svg-render-state.h.

◆ id_value_umap

using svg::id_value_umap = std::unordered_map<string, value_type>

Hash multimap of unique value to (perhaps multiple) unique ids. Use this form for sorting by value.

Definition at line 33 of file a60-svg-radial-arc.h.

◆ jsonstream

using svg::jsonstream = rj::PrettyWriter<rj::StringBuffer>

Aliases/using.

Definition at line 45 of file izzi-json-basics.h.

◆ palette

template<typename T, std::size_t N>
using svg::palette = std::array<T, N>

Palette, finite set of colors used. Must end with color::none.

Definition at line 29 of file a60-svg-color-palette.h.

◆ palette_qf

template<std::size_t N>
using svg::palette_qf = palette<color_qf, N>

Definition at line 35 of file a60-svg-color-palette.h.

◆ palette_qi

template<std::size_t N>
using svg::palette_qi = palette<color_qi, N>

Definition at line 32 of file a60-svg-color-palette.h.

◆ point_2t

using svg::point_2t = std::tuple<space_type, space_type>

Point (x,y) in 2D space.

Definition at line 65 of file a60-svg.h.

◆ point_2tn

using svg::point_2tn = std::tuple<point_2t, ssize_type>

Point (x,y) in 2D space with weight n.

Definition at line 68 of file a60-svg.h.

◆ space_type

using svg::space_type = double

Base floating point type.

Definition at line 62 of file a60-svg.h.

◆ srange

using svg::srange = std::set<point_2t>

Latitude and Longitude Ranges.

Definition at line 85 of file a60-svg.h.

◆ ssize_type

using svg::ssize_type = int

Definition at line 59 of file a60-svg.h.

◆ strings

using svg::strings = std::vector<string>

Definition at line 37 of file a60-svg.h.

◆ uint

using svg::uint = unsigned int

Definition at line 57 of file a60-svg.h.

◆ ulong

using svg::ulong = unsigned long

Definition at line 58 of file a60-svg.h.

◆ ushort

using svg::ushort = unsigned short

Base integer type: positive and negative, signed integral value.

Definition at line 56 of file a60-svg.h.

◆ value_id_ummap

using svg::value_id_ummap = std::unordered_multimap<value_type, string>

Definition at line 34 of file a60-svg-radial-arc.h.

◆ value_set

using svg::value_set = std::set<value_type>

Definition at line 28 of file a60-svg-radial-arc.h.

◆ value_type

using svg::value_type = long long

Hash map of unique id to (not necessarily) unique value. Use this for sorting by id.

Definition at line 27 of file a60-svg-radial-arc.h.

◆ vrange

using svg::vrange = std::vector<point_2t>

Definition at line 86 of file a60-svg.h.

◆ vspace

using svg::vspace = std::vector<double>

Split range, so one dimension of (x,y) cartesian plane.

Definition at line 82 of file a60-svg.h.

◆ vstrings

Definition at line 38 of file a60-svg.h.

◆ vvranges

using svg::vvranges = std::vector<vrange>

Definition at line 87 of file a60-svg.h.

◆ vvstrings

using svg::vvstrings = std::vector<strings>

Definition at line 39 of file a60-svg.h.

Enumeration Type Documentation

◆ color

enum class svg::color
strong

Color enumerated as types.

HUE

color = color enum (and name string conversion)

color_qi = color quantified as RGB integral values 0-255 (similar to Scalar in OpenCV).

color_qf = color quantified as Hue Saturation Value (HSV) decimal values 0-1

spectrum = color spectrum as finite array of color enum values

Enumerator
none 
white 
black 
gray10 
gray20 
gray25 
gray30 
gray40 
gray50 
gray60 
gray75 
gray70 
gray80 
gray90 
wcag_lgray 
wcag_gray 
wcag_dgray 
kanzoiro 
kohakuiro 
kinsusutake 
daylily 
goldenyellow 
hellayellow 
antiquewhite 
lemonchiffon 
goldenrod 
navajowhite 
ivory 
gold 
duboisyellow1 
duboisyellow2 
duboisyellow3 
orange 
darkorange 
asamaorange 
redorange 
orangered 
dutchorange 
internationalorange 
red 
foreigncrimson 
ginshu 
akabeni 
akebonoiro 
ochre 
sohi 
benikaba 
benitobi 
ake 
crimson 
tomato 
coral 
salmon 
duboisred1 
duboisred2 
duboisred3 
duboisbrown1 
duboisbrown2 
duboisbrown3 
duboisbrown4 
duboisbrown5 
byakuroku 
usumoegi 
moegi 
hiwamoegi 
midori 
rokusho 
aotakeiro 
seiheki 
seijiiro 
yanagizome 
green 
chartreuse 
greenyellow 
limegreen 
springgreen 
aquamarine 
duboisgreen1 
duboisgreen2 
duboisgreen3 
duboisgreen4 
duboisgreen5 
blue 
ultramarine 
shinbashiiro 
hanada 
ruriiro 
bellflower 
navy 
asagiiro 
indigo 
rurikon 
asamablue 
cyan 
lightcyan 
powderblue 
steelblue 
cornflowerblue 
deepskyblue 
dodgerblue 
lightblue 
skyblue 
lightskyblue 
midnightblue 
mediumblue 
royalblue 
darkslateblue 
slateblue 
azure 
crayolacerulean 
duboisblue1 
duboisblue2 
duboisblue3 
duboisblue4 
blueprintlight 
blueprint 
blueprintdark 
wisteria 
murasaki 
ayameiro 
peony 
futaai 
benimidori 
redwisteria 
botan 
kokimurasaki 
usuiro 
asamapink 
blueviolet 
darkmagenta 
darkviolet 
thistle 
plum 
violet 
magenta 
dfuschia 
deeppink 
hotpink 
pink 
kissmepink 
palevioletred 
mediumvioletred 
lavender 
orchid 
mediumorchid 
darkestmagenta 
mediumpurple 
purple 
dustyrose 
atmosphericp 
command 
science 
engineering 
last 

Definition at line 41 of file a60-svg-color.h.

◆ matrix_variant

enum class svg::matrix_variant
strong

Grid style mode.

Enumerator
centerweight 
centerweightsvg 
veronica 
slim 

Definition at line 29 of file a60-svg-grid-matrix-systems.h.

◆ scale

enum class svg::scale
strong

Some high-level nobs for rendering: scale tuning.

small == defense distributed == 70k-300k medium == westworld == 2-4M large == stranger things == 10M+

[1-5]xsmall == reduction from least to greatest 1x == baseline [1-5]xlarge == enlargement from least to greatest

Enumerator
r5s 
r4s 
r3s 
r2s 
r1s 
xxsmall 
xsmall 
small 
medium 
baseline 
large 
xlarge 
xxlarge 
e1s 
e2s 
e3s 
e4s 
e5s 

Definition at line 127 of file a60-svg-render-state.h.

◆ select

enum class svg::select
strong

Selected or Active in render area. Make discrete element or layer (visible, outline, etc) if true. Used as a (visibility, outline, etc.) bitmask

Enumerator
none 

nothing

cartography 

cartographic elements

image 

image

raster 

raster (pixel) elements

vector 

svg path, circle, rectangle, etc.

blur 

blur or gradient version of vector

echo 

b & w outline version of vector

text 

metadata, header

title 

title

legend 

text and symbol legends

axis 

axes

grid 

grid

linex 

horizontal lines

liney 

vertical lines

ticks 

ticks, markers

tooltip 

tooltips meta layer

telecom 

telecom infrastructure

tor 

tor exit node infrastructure

satellite 

megaconstellation satellite

cable 

fiber optic

glyph 

glyph

svg 

svg element, perhaps nested

alt 

alternate use specified in situ

background 

background elements

top 

top

bottom 

bottom

odd 

odd

even 

even

all 

all

_S_end 

last

Definition at line 27 of file a60-svg-render-state.h.

◆ unit

enum class svg::unit
strong

Measurement abstraction for absolute (not relative) measurements.

Enumerator
meter 

Meter.

centimeter 
cm 

Centimeter.

millimeter 
mm 

Milliimeter.

inch 
in 

Inch.

pixel 
px 

Pixel where 1 pixel x 96 PPI = .26 mm.

point 
pt 

Point where 1 pixel x 1/72 dpi x 96 PPI = .26 mm.

Definition at line 30 of file a60-svg-base-types.h.

Function Documentation

◆ active_spectrum()

auto & svg::active_spectrum ( const bool sortbyhuep = false)

Oklab https://bottosson.github.io/posts/oklab/.

Set and Get working spectrum, aka default palette. NB: If colorbands are being used, palette has to be izzi or izzi_hue, and cannot be sorted (as color bands use colors arranged in a fixed order with offsets in hue.

Definition at line 370 of file a60-svg-color-palette.h.

+ Here is the call graph for this function:

◆ add_to_id_rstate_cache()

void svg::add_to_id_rstate_cache ( const string id,
const style styl,
const select vis )

Add value to cache with base style of styl, colors klr, visibility vis.

Definition at line 324 of file a60-svg-render-state.h.

+ Here is the call graph for this function:

◆ adjust_angle_at_orbit_for_distance()

double svg::adjust_angle_at_orbit_for_distance ( double r,
double dist,
const double minadjust = 0.25 )
inline

Angle adjustment such that two points on the circumference path of radius

Parameters
rfrom origin are a minimum of
distapart.

NB: If it cannot be computed directly, returns

Parameters
minadjust,aminimum adjustment angle that defaults to 0.25 degrees.

Definition at line 108 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ adjust_angle_rotation()

double svg::adjust_angle_rotation ( const double dorig,
const k::rrotation rot )
inline

Adjust angle above to CW/CCW orientation.

Definition at line 89 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ append_ids_at()

void svg::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.

Definition at line 403 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ average_color_qi()

color_qi svg::average_color_qi ( const color_qi & a,
const color_qi & b )

Average two colors, return the result.

Definition at line 811 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ blink_to_color_seq()

strings svg::blink_to_color_seq ( const rect_element::data & dr,
const color klr,
size_t fps,
double sec,
double twhen,
size_t nblinks,
double blinksec )

blink sequence of duration sec, given fps starts on background (backgf) at duration twhen blinks specific frame (blinkf) times (nblinks) for seconds (blinksec) can use with image behind

Definition at line 80 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ cell_size_3x3_matrix()

ulong svg::cell_size_3x3_matrix ( const area<> a,
const uint n,
const double margin )

Cell size 3x3 for n items with margin spacing on either size.

Definition at line 34 of file a60-svg-grid-matrix-systems.h.

◆ char_height_to_px()

double svg::char_height_to_px ( const uint sz)
constexpr

Approximate pixel height of type of point size @sz.

Definition at line 288 of file a60-svg.h.

◆ char_width_to_px()

double svg::char_width_to_px ( const uint sz)
constexpr

Approximate pixel height of type of point size @sz.

Definition at line 282 of file a60-svg.h.

◆ clear_select()

void svg::clear_select ( select & a,
const select & b )
inline

Definition at line 108 of file a60-svg-render-state.h.

◆ color_qf_distance()

color_qf::ftype svg::color_qf_distance ( const color_qf & k1,
const color_qf & k2 )

Definition at line 707 of file a60-svg-color.h.

◆ color_qf_lt()

bool svg::color_qf_lt ( const color_qf & k1,
const color_qf & k2 )
inline

Forwarding function.

Definition at line 743 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ color_qf_lt_hue_v1()

bool svg::color_qf_lt_hue_v1 ( const color_qf & k1,
const color_qf & k2 )

Less than compare for color_qf.

Definition at line 677 of file a60-svg-color.h.

◆ color_qf_lt_hue_v2()

bool svg::color_qf_lt_hue_v2 ( const color_qf & k1,
const color_qf & k2 )

Definition at line 690 of file a60-svg-color.h.

◆ color_qf_lt_v()

bool svg::color_qf_lt_v ( const color_qf & k1,
const color_qf & k2 )

Default compare distances from k1,k2 to black.

Definition at line 727 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ combine_color_qi()

color_qi svg::combine_color_qi ( const color_qi & a,
const double ad,
const color_qi & b,
const double bd )

Combine color a with color b in percentages ad and ab, respectively.

To average, constrain paramters ad and ab such that: ad + ab == 2.

Like so: ushort ur = (a.r + b.r) / 2; ushort ug = (a.g + b.g) / 2; ushort ub = (a.b + b.b) / 2;

Definition at line 794 of file a60-svg-color.h.

◆ composite_bleed_areas()

void svg::composite_bleed_areas ( svg_element & obj,
const svg::select slxt,
const double bleedin,
const double bleedxoffset = 0 )

Composite frame on bleed. For printed objects with a center gutter, some intra-page adjustments are necessary.

Parameters
slxtis odd/even (left/right)
bleedinis bleed size for one edge in inches. (1/8)
bleedxoffsetis distance from spine pushed outward.

Definition at line 275 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ convert_8859_to_utf8()

string svg::convert_8859_to_utf8 ( string in)

Convert from ISO-8859-1 encoding to UTF-8, required for XML.

Definition at line 29 of file a60-svg-codecvt.h.

◆ convert_to_utf8()

string svg::convert_to_utf8 ( string in)

Definition at line 94 of file a60-svg-codecvt.h.

+ Here is the call graph for this function:

◆ deserialize_json_array_object_field_n()

vrange svg::deserialize_json_array_object_field_n ( const string jdata,
const string afield,
const string field1,
const string field2,
const bool verbosep = true )

Deserialize json array, extract specific fields from array objects, return as vec of point_2t.

jdata == input is path + filename of input JSON data file afield == pointer in json file dom to specific array's data field1 == x field to extract in array field2 == y field to extract in array

Definition at line 211 of file izzi-json-basics.h.

+ Here is the call graph for this function:

◆ deserialize_json_string_to_dom()

rj::Document svg::deserialize_json_string_to_dom ( const string & json)

Deserialize input string.

Definition at line 78 of file izzi-json-basics.h.

◆ deserialize_json_to_dom()

rj::Document svg::deserialize_json_to_dom ( const string input_file)

Deserialize input file.

Definition at line 95 of file izzi-json-basics.h.

+ Here is the call graph for this function:

◆ deserialize_json_to_dom_array()

rj::Document svg::deserialize_json_to_dom_array ( const string input_file)

Load JSON file to in-memory DOM array.

Definition at line 133 of file izzi-json-basics.h.

+ Here is the call graph for this function:

◆ deserialize_json_to_dom_object()

rj::Document svg::deserialize_json_to_dom_object ( const string input_file)

Load JSON file to in-memory DOM.

Definition at line 117 of file izzi-json-basics.h.

+ Here is the call graph for this function:

◆ detect_collision()

bool svg::detect_collision ( const point_2t & p1,
const int r1,
const point_2t & p2,
const int r2 )

Definition at line 244 of file a60-svg.h.

+ Here is the call graph for this function:

◆ direction_arc_at()

void svg::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.

Definition at line 28 of file a60-svg-radial-direction-arc-glyph.h.

+ Here is the call graph for this function:

◆ direction_arc_title_at()

void svg::direction_arc_title_at ( svg_element & obj,
const point_2t origin,
const int radius,
const typography typo,
const string title,
const uint pcnt = 30 )

Title on same arc.

Definition at line 94 of file a60-svg-radial-direction-arc-glyph.h.

+ Here is the call graph for this function:

◆ display_color_qis()

svg_element svg::display_color_qis ( const auto & klrs,
const area<> a,
const typography & typobase )

Make grid palette for display. NB.

Parameters
klrscan be color_qis or array/palette.

Definition at line 843 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ distance_cartesian()

space_type svg::distance_cartesian ( const point_2t & p1,
const point_2t & p2 )

Find cartesian distance between two 2D points.

Definition at line 230 of file a60-svg.h.

◆ dot_grid_seq()

string svg::dot_grid_seq ( const rect_element::data & drin,
const color klr,
const rect_element::atype radius = 80,
const int maxwidth = 8,
const int maxheight = 4,
const rect_element::atype xstart = 40,
const rect_element::atype ystart = 100 )

Randomly create grid of [maxwidth] x [maxheight] grid, and fill with dots.

Definition at line 358 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ element_to_svg_insert()

string svg::element_to_svg_insert ( const string isvgpre)

Import svg file, convert it to svg_element for insertion.

Definition at line 154 of file a60-svg-composite-and-layer-basics.h.

◆ extract_dom_value_to_double()

double svg::extract_dom_value_to_double ( const rj::Value & v)

Extract from raw JSON value to double.

Definition at line 179 of file izzi-json-basics.h.

◆ fade_from_color_seq()

strings svg::fade_from_color_seq ( const rect_element::data & dr,
const color klr,
size_t fps = 30,
double sec = 1.0,
double minopac = 0 )

Start rectangle as transparent, fade to color.

Definition at line 65 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ fade_to_color_seq()

strings svg::fade_to_color_seq ( const rect_element::data & dr,
const color klr,
size_t fps = 30,
double sec = 1.0,
double maxopac = 1.0 )

Fade rectangle fill from transparent to color, of duration sec, given fps starts on white (klr), fades to klr color in sec can use with image behind

Definition at line 34 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ file_to_svg_insert()

string svg::file_to_svg_insert ( const string ifile)

Import svg file, convert it to svg_element for insertion. ifile is a plain SVG file with a 1:1 aspect ratio.

Definition at line 122 of file a60-svg-composite-and-layer-basics.h.

◆ find_vrange_change_points()

vrange svg::find_vrange_change_points ( const vrange & vr)

Simplify sorted vrange by removing interior duplicates.

Definition at line 116 of file a60-svg.h.

◆ flip_select()

void svg::flip_select ( select & a,
const select & b )
inline

Definition at line 112 of file a60-svg-render-state.h.

◆ get_angle()

double svg::get_angle ( ssize_type pvalue,
ssize_type pmax )
inline

Transform a value on a range to an angle on the radial range.

Definition at line 78 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ get_circumference_point_d()

point_2t svg::get_circumference_point_d ( const double ad,
const double r,
const point_2t origin )

Angle in degrees.

Definition at line 541 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ get_circumference_point_r()

point_2t svg::get_circumference_point_r ( const double angler,
const double r,
const point_2t origin )

Angle in radians.

Definition at line 529 of file a60-svg-render-basics.h.

◆ get_dpi()

double & svg::get_dpi ( )

Resolution of output display device.

Definition at line 256 of file a60-svg.h.

◆ get_id_rstate()

const id_rstate svg::get_id_rstate ( const string id)

Given identifier/name/id, get corresponding id_rstate from cache.

Definition at line 337 of file a60-svg-render-state.h.

+ Here is the call graph for this function:

◆ get_id_rstate_cache()

id_rstate_umap & svg::get_id_rstate_cache ( )

Definition at line 315 of file a60-svg-render-state.h.

◆ get_label_spaces()

ssize_type & svg::get_label_spaces ( )

Get the label space. Value -> Name, as a string where value has labelspaces of fill NB: Should be the number of significant digits in pmax plus separators. So, 10 == 2, 100 == 3, 10k == 5 + 1.

Definition at line 161 of file a60-svg-radial-base.h.

◆ get_min_ring_size()

int & svg::get_min_ring_size ( )

The smallest (sattelite) radius size allowed in a kusama orbit.

Definition at line 27 of file a60-svg-radial-kusama.h.

◆ get_min_satellite_distance()

double & svg::get_min_satellite_distance ( )

The minimum distance between satellites in high orbit.

Definition at line 46 of file a60-svg-radial-kusama.h.

◆ get_radial_range()

point_2t & svg::get_radial_range ( )

Max number of non-overlapping degrees in radial form, as a tuple of (min, max).

Total degrees in a circle are 360, but then the beginning and the end of the radial display are in the same place, which may confusing. So, shave a bit off both ends for the optics, so that there is a gap between the beginning and end of the generated radial viz. The default is such that the beginning and the end have a discernable gap.

Definition at line 56 of file a60-svg-radial-base.h.

◆ get_render_state()

color_rstate & svg::get_render_state ( )

Global state.

Definition at line 282 of file a60-svg-render-state.h.

◆ insert_svg_at()

svg_element svg::insert_svg_at ( svg_element & obj,
const string isvg,
const point_2t origin,
const double origsize,
const double isize,
const double angled = 0,
const style & styl = k::no_style )

Embed svg in group element.

Parameters
objis containing svg
originis where glyph placement is inside containing svg element.
origsizeis original file width/height constant
isizeis final width/height
isvgis the raw svg string to insert, assumes _M_lifetime == false.
stylis overide style information: defaults to no_style.

NB This only works is the file has no styles set in svg, group, or individual element definitions (like circle, path, rectangle, etc.).

See: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/svg

Definition at line 194 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ kusama_collision_transforms()

void svg::kusama_collision_transforms ( svg_element & obj,
const point_2t origin,
std::vector< ssize_type > & vuvalues,
vvstrings & vids,
const ssize_type value_max,
const int radius,
const int rspace,
const int rstart,
const typography & typo,
const bool weighbyvaluep,
const ssize_type threshold = 1,
const int startlenm = 5 )

Split values into

Go through values, if there are two values that are adjacent,

  • move the first value out to a larger radius, rprime.
  • render the first value at rprime, remove it from the list.
  • save the second value and continue

A point cluster is a circle whos radius is proportionate to the number of duplicate ids at that point. Duplicate ids splay, stack, or append/concatencate at, after, or around that point cluster.

NB: invariant that @vuvalues > 1

Threshold is the range such that a value is considered adjacent for collisions. If v > previous value + threshold, then the points are not considered neighbors.

startlen is the point at which high-orbit is drawn after transform.

Parameters
rstartis the multiple of radius that is startlen.

Definition at line 401 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ kusama_ids_at_uvalue()

void svg::kusama_ids_at_uvalue ( svg_element & obj,
const point_2t origin,
const strings & ids,
const ssize_type v,
const ssize_type value_max,
const int radius,
const int rspace,
const int rstart,
const int linelen,
const typography & typo,
const bool weighbyvaluep )

Layer one value's glyphs and ids.

Definition at line 347 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ kusama_ids_orbit_high()

int svg::kusama_ids_orbit_high ( svg_element & obj,
const point_2t origin,
const strings & ids,
const ssize_type v,
const ssize_type value_max,
const int radius,
const int rspace,
const int rstart,
const int linelen,
const typography & typo,
const bool wbyvaluep,
const bool satellitep = false )

Draw these ids around a kusama low orbit circle on arcs from the origin circle.

Simplest version, make satellite circle on circumference and splay or append id's around it.

Parameters
radiusLength of line on a ray from origin to value.
satdistanceMultiple used to compute distance between two satellite values. Useful defaults: 3.3 for 12pt, 2 for 7pt.

Definition at line 221 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ kusama_ids_orbit_low()

void svg::kusama_ids_orbit_low ( svg_element & obj,
const point_2t origin,
const strings & ids,
const ssize_type v,
const ssize_type value_max,
const int radius,
const int rspace,
const int rstart,
const int linelen,
const typography & typo,
const bool wbyvaluep )

Draw these ids as a glyph on the circumference of origin circle.

Simplest version.

Definition at line 302 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ kusama_ids_per_uvalue_on_arc()

svg_element svg::kusama_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,
const bool weighbyvaluep = true,
const bool collisionp = false,
const bool sortstringsbysizep = false )

Radiate as *_per_uvalue_on_arc function, but group similar values such that they are globbed into a satellite circle, ids splayed around the satellite, and not written on top of each other on the same arc/angle.

Framing circle radius is the result of dividing page dimensions by (rdenom).

Satellite circle radius is the product of the number of ids with the same value times a base multipler (rbase).

When overlap is detected, move outward on radius if true, otherwise move in.

Definition at line 484 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ make_1_channel_insert()

void svg::make_1_channel_insert ( svg_element & obj,
string insert1 )

Definition at line 34 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ make_2_channel_insert()

void svg::make_2_channel_insert ( svg_element & obj,
string insert1,
string insert2 )

Definition at line 57 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ make_circle()

circle_element svg::make_circle ( const point_2t origin,
style s,
const space_type r = 4,
const string xform = "" )

Make circle element.

Definition at line 374 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_color_band()

color_qis svg::make_color_band ( const colorband & cb,
const ushort neededh )

Forwarding function.

Definition at line 153 of file a60-svg-color-band.h.

+ Here is the call graph for this function:

◆ make_color_band_v1()

color_qis svg::make_color_band_v1 ( const colorband & cb,
const ushort neededh,
auto & spectrum )

Generate a color band from starting hue and seeds.

Algorithm is average two known good, where two picked randomly.

Return type is a vector of generated color_qi types.

Definition at line 54 of file a60-svg-color-band.h.

+ Here is the call graph for this function:

◆ make_color_band_v2()

color_qis svg::make_color_band_v2 ( const colorband & cb,
const ushort neededh )

Algorightm is HSV generation.

Definition at line 104 of file a60-svg-color-band.h.

+ Here is the call graph for this function:

◆ make_crossed_lines()

string svg::make_crossed_lines ( const point_2t origin,
const style s,
const double radius,
const double tiltd = 0.0 )

Crossed lines, no fill. X marks the ....

Definition at line 806 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_label_for_value()

string svg::make_label_for_value ( string pname,
ssize_type pvalue,
const uint valuewidth = 9 )

Make radial labels.

Definition at line 176 of file a60-svg-radial-base.h.

◆ make_line()

line_element svg::make_line ( const point_2t origin,
const point_2t end,
style s,
const string dasharray = "" )

Line primitive.

Definition at line 271 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_line_graph()

svg_element svg::make_line_graph ( const svg::area<> aplate,
const vrange & points,
const graph_rstate & gstate,
const point_2t xrange,
const point_2t yrange )

Returns a svg_element with the chart and labels Assume: vgrange x axis is monotonically increasing.

Definition at line 332 of file a60-svg-graphs-line.h.

+ Here is the call graph for this function:

◆ make_line_graph_annotations()

svg_element svg::make_line_graph_annotations ( const area<> aplate,
const vrange & points,
const graph_rstate & gstate,
const double xscalein = 1,
const double yscalein = 1,
const typography typo = k::apercu_typo )

Axis Labels Axis X/Y Ticmarks X line increments.

Definition at line 177 of file a60-svg-graphs-line.h.

+ Here is the call graph for this function:

◆ make_line_graph_markers_tips()

string svg::make_line_graph_markers_tips ( const vrange & points,
const vrange & cpoints,
const graph_rstate & gstate,
const double radius )

Return set of paths corresponding to marker shapes with tooltips.

Definition at line 85 of file a60-svg-graphs-line.h.

+ Here is the call graph for this function:

◆ make_marker_circle()

marker_element svg::make_marker_circle ( const std::string id,
const area<> ma,
const point_2t mcp,
const uint radius,
const style styl )

Definition at line 51 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_marker_element()

marker_element svg::make_marker_element ( const std::string id,
const area<> ma,
const point_2t mcp,
const std::string raw )

Base function for generating SVG markers in a defs section.

Marker styles, ways to make line start, mid points, and enpoints look distinct.

https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/

stroke_dash_array Attribute/stroke-dasharray

polyline marker-mid Attribute/marker-mid

Definition at line 39 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_marker_rect()

marker_element svg::make_marker_rect ( const std::string id,
const area<> ma,
const point_2t mcp,
const style styl )

Definition at line 78 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_marker_set_n()

string svg::make_marker_set_n ( const double i)

Create a set of markers bounded by a rectangle of size n.

Definition at line 89 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_marker_triangle()

marker_element svg::make_marker_triangle ( const std::string id,
const area<> ma,
const point_2t mcp,
const uint radius,
const style styl )

Definition at line 60 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_marker_x()

marker_element svg::make_marker_x ( const std::string id,
const area<> ma,
const point_2t mcp,
const uint radius,
const style styl )

Definition at line 69 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_markers()

void svg::make_markers ( svg_element & obj)

Make black/white/wcag markers with sizes 4x4 and 2x2.

Definition at line 113 of file a60-svg-markers.h.

+ Here is the call graph for this function:

◆ make_path()

path_element svg::make_path ( const string & pathda,
const style & styl,
const string name = "",
const bool selfclosingtagp = true )

Draw path given serialized path data. Assumes pinstripe, ie top and bottom line layers. top style defaults: fill opac(0), stroke opac(1), stroke sz 1 bottom style defaults: fill opac(0), stroke opac(1), stroke sz 1.25.

Definition at line 602 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_arc_circumference()

string svg::make_path_arc_circumference ( const point_2t & start,
const point_2t & end,
const space_type r,
const int arcflag = 0,
const int sweepflag = 1 )

Make path segment between two points on a circumference of radius r. Points like: get_circumference_point_d(zero_angle_north_cw(0), r, origin)

Definition at line 700 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_arc_closed() [1/2]

string svg::make_path_arc_closed ( const point_2t & origin,
const double startd,
const double endd,
const space_type r,
const int arcflag = 0,
const int sweepflag = 0 )

Same but with degree range arguments instead of points. NB: Assumes appropriate zero_angle_north_cw/ccw adjustments on startd/endd.

Definition at line 745 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_arc_closed() [2/2]

string svg::make_path_arc_closed ( const point_2t & origin,
const point_2t & start,
const point_2t & end,
const space_type r,
const int arcflag = 0,
const int sweepflag = 0 )

Make closed path between two points and the center of a circle of radius r. Points like: get_circumference_point_d(zero_angle_north_cw(0), r, origin)

Definition at line 719 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_center_mark()

path_element svg::make_path_center_mark ( const point_2t & origin,
const style styl,
const int len,
const int width )

Plus or x tilt mark as closed path that can be filled.

Definition at line 757 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_data_from_points()

string svg::make_path_data_from_points ( const vrange & lpoints)

Make single path segment.

Definition at line 578 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_octogon()

path_element svg::make_path_octogon ( const point_2t origin,
const style styl,
const double r = 4,
const uint pointsn = 8 )

Center an octogon at this point. radius 4 is pixels to draw out from center point. pointsn is number of points to draw (8 for octogon)

Definition at line 662 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_path_triangle()

path_element svg::make_path_triangle ( const point_2t origin,
const style styl,
const double r = 4,
const double angle = 120,
const bool selfclosingtagp = true )

Center a triangle at this point.

Definition at line 627 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_polyline()

polyline_element svg::make_polyline ( const vrange & points,
const style s,
const stroke_style sstyle = { } )

Polyline primitive.

Definition at line 299 of file a60-svg-render-basics.h.

◆ make_rect()

rect_element svg::make_rect ( const point_2t origin,
const style s,
const area<> a,
const string filterstr = "" )

Create rect_element at origin.

Definition at line 313 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_rect_centered()

rect_element svg::make_rect_centered ( const point_2t origin,
const style s,
const area<> a,
const string filterstr = "" )

Create rect_element centered at origin.

Definition at line 335 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ make_svg_1_channel()

svg_element svg::make_svg_1_channel ( const space_type deltax,
const space_type deltay,
const string & outbase )

Take input size and make a one channel (single-image) SVG form.

Definition at line 24 of file a60-svg-composite-and-layer-basics.h.

◆ make_svg_2_channel()

svg_element svg::make_svg_2_channel ( const space_type deltax,
const space_type deltay,
const string & outbase )

Take input size and make a two channel (single-image) SVG form.

Definition at line 47 of file a60-svg-composite-and-layer-basics.h.

◆ max_vrange() [1/2]

point_2t svg::max_vrange ( const vrange & points,
const uint pown,
const double xscale = 1,
const double yscale = 1 )

Just the range info, none of the temporary objects.

Definition at line 182 of file a60-svg.h.

+ Here is the call graph for this function:

◆ max_vrange() [2/2]

point_2t svg::max_vrange ( vspace & xpoints,
vspace & ypoints,
const uint pown )

For each dimension of vrnage, find min/max and return (xmax, ymax) NB: Assumes zero is min.

Definition at line 147 of file a60-svg.h.

◆ mutate_color_qf()

color_qf svg::mutate_color_qf ( const color_qf & k)

Return a variant on saturation/value only.

Definition at line 763 of file a60-svg-color.h.

◆ narrow_vspace()

vspace svg::narrow_vspace ( const vspace & points,
uint pown )

Truncate double to double with pown signifigant digits.

Definition at line 195 of file a60-svg.h.

◆ nest_inner_svg_element_centered()

svg_element svg::nest_inner_svg_element_centered ( const svg_element & obj,
const point_2t & p )

Take.

Parameters
objas some kind of svg element or group of elements, and embed it as a nested svg at a location centered at
poson the main svg.

Definition at line 236 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ next_color()

color_qi svg::next_color ( const color_qi klr)

Loop through color array starting at position c. Iff klr is not found, return color::none as the next color.

Definition at line 416 of file a60-svg-color-palette.h.

+ Here is the call graph for this function:

◆ next_in_color_band()

color_qi svg::next_in_color_band ( const colorband & cb,
const ushort bandn = 400 )

Flip through color band colors.

Parameters
bandnis the number of colors in the colorband.

Definition at line 163 of file a60-svg-color-band.h.

+ Here is the call graph for this function:

◆ operator&()

select svg::operator& ( select __a,
select __b )
inlineconstexpr

Definition at line 62 of file a60-svg-render-state.h.

◆ operator&=()

const select & svg::operator&= ( select & __a,
select __b )
inline

Definition at line 95 of file a60-svg-render-state.h.

◆ operator<()

bool svg::operator< ( const color_qf & c1,
const color_qf & c2 )
inline

Definition at line 756 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ operator==() [1/2]

bool svg::operator== ( const color_qf & c1,
const color_qf & c2 )
inline

Definition at line 748 of file a60-svg-color.h.

◆ operator==() [2/2]

bool svg::operator== ( const color_qi & c1,
const color_qi & c2 )
inline

Definition at line 515 of file a60-svg-color.h.

◆ operator^()

select svg::operator^ ( select __a,
select __b )
inlineconstexpr

Definition at line 77 of file a60-svg-render-state.h.

◆ operator^=()

const select & svg::operator^= ( select & __a,
select __b )
inline

Definition at line 99 of file a60-svg-render-state.h.

◆ operator|()

select svg::operator| ( select __a,
select __b )
inlineconstexpr

Definition at line 70 of file a60-svg-render-state.h.

◆ operator|=()

const select & svg::operator|= ( select & __a,
select __b )
inline

Definition at line 91 of file a60-svg-render-state.h.

◆ operator~()

select svg::operator~ ( select __a)
inlineconstexpr

Definition at line 84 of file a60-svg-render-state.h.

◆ optical_sound_dots_seq()

strings svg::optical_sound_dots_seq ( const rect_element::data & drin,
const color klr,
size_t fps = 30,
double sec = 1.0,
const int radius = 80,
const int maxw = 8,
const int maxh = 4,
const int xstart = 40,
const int ystart = 100 )

Simulated optical sound dots, or film processing punches, an experimental film stylistic.

"The conclusion of a Warhol film is usually announced by the appearance of a flurry of white dots—an artifact of the identification number punched into the last few feet of the roll at the lab." Kyle Westphal, Andy Warhol's Magic Trick

Analyzing Warhol's Outer and Inner Space frame-by-frame, assume: 1920 x 1080 frame size 160 pixel diameter circles, with 240 pixel horiz/vert spacing 100 pixel from edge

At 30fps, sequence is:

  • 2 frames dot pattern 1
  • 2 frames dot pattern 2
  • 17 frames nothing
  • 2 frames dot pattern 3
  • 2 frames dot pattern 4

Simplify to:

  • 2 frames dot pattern 1
  • 2 frames dot pattern 2
  • 20 frames blank

compositions are no more than four across, and sometimes go off the frame

r == frame size

Definition at line 439 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ paint_edges_with_char_index()

void svg::paint_edges_with_char_index ( svg_element & obj,
const area<> a,
const char firstc,
const svg::color klr = color::duboisgreen2,
const double rlen = 24.0 )

Paint the edges of a physical page. Assumes page is square. /.

Parameters
rlenis height of painted rectangle from edge. NB: 0.125 is a common bleed == 12 pixels. First attempt was, common bleed plus 2 pixel "on page" -> 14. Not enough.

Definition at line 82 of file a60-svg-composite-and-layer-basics.h.

+ Here is the call graph for this function:

◆ place_ray_at_angle()

void svg::place_ray_at_angle ( svg_element & obj,
const point_2t & origin,
const point_2t & circump,
const style & s,
const string id = "" )

Definition at line 504 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_2d_to_ray()

void svg::point_2d_to_ray ( svg_element & obj,
double x,
double y,
style s,
space_type r = 4,
const uint nrays = 10 )

Lines radiating from center point (x,y).

Definition at line 473 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_circle()

void svg::point_to_circle ( svg_element & obj,
const point_2t origin,
style s,
const space_type r = 4,
const string xform = "" )

Draws a circle around a point (x,y), of style (s), of radius (r).

Definition at line 390 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_crossed_lines()

void svg::point_to_crossed_lines ( svg_element & obj,
const point_2t origin,
const style & styl,
const int radius,
const double tiltd = 0.0 )

Point to center mark as crossed lines. Default is a plus sign at origin, but.

Parameters
tiltdcan rotate.

Definition at line 831 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_octogon()

void svg::point_to_octogon ( svg_element & obj,
const point_2t origin,
const style s,
const double r = 4 )

Center an octogon at this point.

Definition at line 689 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_rect()

void svg::point_to_rect ( svg_element & obj,
const point_2t origin,
style s,
double width = 4,
double height = 4,
const string filterstr = "" )

Rectangle at this point.

Definition at line 351 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_rect_centered()

void svg::point_to_rect_centered ( svg_element & obj,
const point_2t origin,
style s,
double width = 4,
double height = 4,
const string filterstr = "" )

Center a rectangle at this point.

Definition at line 362 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_ring_halo()

void svg::point_to_ring_halo ( svg_element & obj,
const point_2t origin,
const space_type radius,
const double blurspace,
const svg::color klr,
const svg::color fadeklr = color::none,
const double opacity = 1 )

Draws a ring centered at origin of radius r, with outer and inner radial gradient of blurspace in each direction. klr == fade from fadeklr == fade to. Background is transparent if none.

Definition at line 403 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ point_to_triangle()

void svg::point_to_triangle ( svg_element & obj,
const point_2t origin,
const style s,
const double r = 4,
const double angle = 120 )

Center a triangle at this point.

Definition at line 650 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ points_to_line()

void svg::points_to_line ( svg_element & obj,
const style s,
const point_2t origin,
const point_2t end,
const string dasharray = "" )

Line between two points.

Definition at line 288 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ pt_to_px()

double svg::pt_to_px ( const uint i = 1)

Conversion between point size to pixels given dpi density.

Definition at line 265 of file a60-svg.h.

◆ radial_text_ccw() [1/2]

void svg::radial_text_ccw ( svg_element & obj,
string text,
const typography & typo,
const point_2t origin,
const double deg )

Text with typography, arranged ccw around points (x,y) on a circle.

Definition at line 215 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ radial_text_ccw() [2/2]

void svg::radial_text_ccw ( svg_element & obj,
string text,
const typography & typo,
const point_2t origin,
const double deg,
const point_2t rorigin )

Text with typography, arranged ccw around points (x,y) on a circle.

Definition at line 241 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ radial_text_cw() [1/2]

void svg::radial_text_cw ( svg_element & obj,
string text,
const typography & typo,
const point_2t origin,
const double deg )

Text with typography, arranged cw around points (x,y) on a circle.

Definition at line 202 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ radial_text_cw() [2/2]

void svg::radial_text_cw ( svg_element & obj,
string text,
const typography & typo,
const point_2t origin,
const double deg,
const point_2t rorigin )

Text with typography, arranged cw around points (x,y) on a circle.

Definition at line 228 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ radial_text_r()

void svg::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 )

Easier to read radial text that switches orientation at 180 degrees, instead of going upside-down as it follows the circle around the circumference, aka mirrored or symmetric radial text.

Text with typography, arranged around an origin of a circle with radius r. Text is align left CW (1,180) Text is aligh right CCW (181, 359)

NB: Assume value is un-adjusted, aka from get_angle

roriginp is a switch to use a render origin, not the text position, as the rotation origin.

Definition at line 267 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ radiate_glyph()

int svg::radiate_glyph ( svg_element & obj,
const point_2t origin,
const double angled,
const id_rstate idst,
const int kr,
const int rspace,
const int rstart )

Draw glyph on ray from origin as part of kusama.

Definition at line 96 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ radiate_glyph_and_id() [1/2]

int svg::radiate_glyph_and_id ( svg_element & obj,
const point_2t origin,
const double angled,
const double kr,
const int rspace,
const int rstart,
const string id,
const typography & typo )

Draw glyph and id on ray from origin as part of kusama. skip (origin to rstart) + rspace + glyph of radius + rspace + id

Parameters
originis center of the primary/base circle for kusama renderings.
kris of the kusama satellite circle on the ray.
rspaceis the distance between text/vector/glyph elements
rstartis the length from origin along the ray to begin rendering

Returns the length along the arc of the generated glyph.

Definition at line 157 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ radiate_glyph_and_id() [2/2]

int svg::radiate_glyph_and_id ( svg_element & obj,
const point_2t origin,
const ssize_type v,
const ssize_type value_max,
const int radius,
const int rspace,
const int rstart,
const string id,
const typography & typo )

Convenience function for above.

Definition at line 198 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ radiate_id_at_value()

void svg::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 )

Draw text on the circumference of a circle of radius r centered at (cx, cy) corresponding to the angle above.

Definition at line 80 of file a60-svg-radial-arc.h.

+ Here is the call graph for this function:

◆ radiate_ids_at_uvalue()

void svg::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.

Definition at line 131 of file a60-svg-radial-arc.h.

+ Here is the call graph for this function:

◆ radiate_ids_per_uvalue_on_arc()

svg_element svg::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 )

Radiate as above, but group similar values such that they are splayed, and not written on top of each other on the same arc/angle.

Definition at line 160 of file a60-svg-radial-arc.h.

+ Here is the call graph for this function:

◆ radiate_ids_per_value_on_arc()

svg_element svg::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 )

Create radial viz of names from input file arranged clockwise around the edge of a circle circumference. The text of the names can be rotated, or not.

Arguments are:

rdenom == scaling factor for radius of circle used for display, where larger values (used as a denominator) make smaller (tighter) circles.

rotatep == rotate name text to be on an arc from the origin of the circle.

Definition at line 108 of file a60-svg-radial-arc.h.

+ Here is the call graph for this function:

◆ radiate_line_and_value()

int svg::radiate_line_and_value ( svg_element & obj,
const point_2t origin,
const double angled,
const ssize_type v,
const int rspace,
const int rstart,
const int linelen,
const typography & typo,
const style styl = {color::black, 1, color::black, .25, 1} )

Draw line and value on ray from origin as part of kusama. skip (origin to rstart) + rspace + line of length lineline + rspace + value

Returns the length along the arc of the generated glyph minus text part.

Definition at line 71 of file a60-svg-radial-kusama.h.

◆ random_color() [1/2]

template<typename _Spectrm>
color_qi svg::random_color ( const _Spectrm & spectrm,
const uint startoffset = 0 )

Definition at line 404 of file a60-svg-color-palette.h.

◆ random_color() [2/2]

color_qi svg::random_color ( const uint startoffset = 0)

Random entry from array above.

Definition at line 392 of file a60-svg-color-palette.h.

+ Here is the call graph for this function:

◆ remove_matches_id_value_map()

id_value_umap svg::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.

Definition at line 40 of file a60-svg-radial-arc.h.

◆ scale_proportional_to_area()

double svg::scale_proportional_to_area ( double radius,
double weight )

Definition at line 24 of file a60-svg-render-basics.h.

◆ scale_proportional_to_weight()

double svg::scale_proportional_to_weight ( double radius,
double weight )

Definition at line 37 of file a60-svg-render-basics.h.

◆ scale_value_on_range()

double svg::scale_value_on_range ( const ssize_type value,
const ssize_type min,
const ssize_type max,
const ssize_type nfloor,
const ssize_type nceil )

Scale value from min to max on range (nfloor, nceil).

Definition at line 216 of file a60-svg.h.

◆ search_dom_for_int_field()

int svg::search_dom_for_int_field ( const rj::Document & dom,
const string finds )

Search DOM for integer values.

Definition at line 164 of file izzi-json-basics.h.

◆ search_dom_for_string_field()

string svg::search_dom_for_string_field ( const rj::Document & dom,
const string finds )

Search DOM for string literals.

Definition at line 149 of file izzi-json-basics.h.

◆ serialize_id_types_json()

void svg::serialize_id_types_json ( jsonstream & writer,
const auto & ids,
const string tag )

Serialize set of id_type.

Definition at line 50 of file izzi-json-basics.h.

◆ set_label_spaces()

void svg::set_label_spaces ( ssize_type spaces)

Set the number of label spaces.

Definition at line 170 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ set_min_ring_size()

int svg::set_min_ring_size ( const int sz)

By observation, type size 12pt = 5, 6pt = 2.

Definition at line 35 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ set_min_satellite_distance()

double svg::set_min_satellite_distance ( const double kuse)

By observation, 7pt = 5 minimum NB: Make sure distance is at least text height away for lowest values.

Definition at line 55 of file a60-svg-radial-kusama.h.

+ Here is the call graph for this function:

◆ set_radial_range()

point_2t svg::set_radial_range ( const space_type rmin,
const space_type rmax )

Convenience for setting radial range.

Definition at line 64 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ set_select()

void svg::set_select ( select & a,
const select & b )
inline

Forwarding functions.

Definition at line 104 of file a60-svg-render-state.h.

◆ significant_digits_in()

uint svg::significant_digits_in ( ssize_type maxval)

The number of significant digits in.

Parameters
maxval.

Definition at line 144 of file a60-svg-radial-base.h.

◆ sized_text()

void svg::sized_text ( svg_element & obj,
svg::typography typo,
const int sz,
const string text,
const int tx,
const int ty )

Text at size.

Definition at line 162 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ sized_text_r()

void svg::sized_text_r ( svg_element & obj,
svg::typography typo,
const int sz,
const string text,
const int tx,
const int ty,
const double deg )

Text at size, with a transformation=rotation.

Definition at line 178 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ sort_strings_by_size()

void svg::sort_strings_by_size ( strings & ids)

Sort vectors of strings to largest length string first. (Or use set<>).

Definition at line 192 of file a60-svg-radial-base.h.

◆ splay_ids_after()

void svg::splay_ids_after ( svg_element & obj,
const typography & typo,
const strings & ids,
const double angledo,
const point_2t origin,
double r,
double rspace )

Spread ids past the origin point, along circumference path.

Definition at line 347 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ splay_ids_around()

void svg::splay_ids_around ( svg_element & obj,
const typography & typo,
const strings & ids,
const double angled,
const point_2t origin,
double r,
double rspace,
const bool satellitep = false )

Spread ids on either side of an origin point, along circumference path.

Definition at line 310 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ splay_ids_stagger()

void svg::splay_ids_stagger ( svg_element & obj,
const typography & typo,
const strings & ids,
const double angled,
const point_2t origin,
double r,
double rspace )

Spread ids after in stepping pattern outward.

Definition at line 363 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ split_vrange()

void svg::split_vrange ( const vrange & cpoints,
vspace & xpoints,
vspace & ypoints,
const double xscale = 1,
const double yscale = 1 )

Decompose/split 2D ranges to 1D spaces, perhaps with scaling.

Definition at line 92 of file a60-svg.h.

◆ stack_ids_at()

void svg::stack_ids_at ( svg_element & obj,
const typography & typoo,
const strings & ids,
const double angled,
const point_2t origin,
double r,
const double rdelta = 10 )

Rotate and stack ids at origin point, extending radius for each from point of origin.

Definition at line 383 of file a60-svg-radial-base.h.

+ Here is the call graph for this function:

◆ start_at_color()

color_qi svg::start_at_color ( const color_qi klr)

Start at specified color bar entry point.

Definition at line 433 of file a60-svg-color-palette.h.

+ Here is the call graph for this function:

◆ string_replace()

void svg::string_replace ( std::string & target,
const std::string & match,
const std::string & replace )
inline

Definition at line 43 of file a60-svg.h.

◆ style_text()

text_element svg::style_text ( const string text,
const point_2t origin,
const typography typo )

Text elemetn at.

Parameters
origin,withstyle.

Definition at line 46 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ styled_text() [1/2]

void svg::styled_text ( svg_element & obj,
const string text,
const point_2t origin,
const typography typo )

Text at.

Parameters
origin,withstyle.

Definition at line 60 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ styled_text() [2/2]

void svg::styled_text ( svg_element & obj,
const string text,
const point_2t origin,
const typography typo,
const string xform )

Text at.

Parameters
origin,withstyle and transform

Definition at line 70 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ styled_text_link()

void svg::styled_text_link ( svg_element & obj,
const string text,
const point_2t origin,
const typography typo,
const string uri )

XXX Text at.

Parameters
origin,withstyle and link.

Definition at line 122 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ styled_text_r() [1/2]

void svg::styled_text_r ( svg_element & obj,
const string text,
const point_2t origin,
const typography typo,
const double deg )

Text at.

Parameters
origin,withstyle and ... a transformation=rotation of
degabout origin.

Definition at line 87 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ styled_text_r() [2/2]

void svg::styled_text_r ( svg_element & obj,
const string text,
const point_2t origin,
const typography typo,
const double deg,
const point_2t rorigin )

Text at.

Parameters
origin,withstyle and ... a transformation=rotation of
degabout
rorigin.

Definition at line 104 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ swipe_left_seq()

strings svg::swipe_left_seq ( const rect_element::data & drin,
const string imgf,
const color klr = color::white,
size_t fps = 30,
double sec = 9 )

1 channel start with image, background color is klr each "frame" == string in returned strings has an image and a background

Definition at line 476 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ text_line_n()

uint svg::text_line_n ( svg_element & obj,
const point_2t origin,
const string text,
const svg::typography typo,
const int sz,
const uint maxlen )

Text of maxlen length, overflow goes on line below.

Definition at line 194 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ text_line_n_r()

uint svg::text_line_n_r ( svg_element & obj,
const point_2t origin,
const string text,
const svg::typography typo,
const uint sz,
const uint maxlen,
const uint lettingsz = 0 )

Text of maxlen length rotated, overflow goes on line below.

Definition at line 224 of file a60-svg-render-basics.h.

+ Here is the call graph for this function:

◆ to_point_in_1x8_matrix()

point_2t svg::to_point_in_1x8_matrix ( const area<> a,
const uint i,
const double margin )

For positioning a linear list of glyphs along a horizontal line. Assuming i is from find_id_index with tag, so is an offset starting at zero.

Definition at line 188 of file a60-svg-grid-matrix-systems.h.

◆ to_point_in_1xn_matrix()

point_2t svg::to_point_in_1xn_matrix ( const area<> a,
const uint n,
const uint i,
const double margin,
const double y,
const bool centeredp = false )

For positioning a linear list of glyphs along a horizontal line.

Parameters
nis number of matrix cells, greater than one.
iis from find_id_index with tag, so is an offset starting at zero.
centeredpadjusts to the center of the cell, default is left aligned.
yis what y axis to use.

Definition at line 209 of file a60-svg-grid-matrix-systems.h.

◆ to_point_in_2x4_matrix()

point_2t svg::to_point_in_2x4_matrix ( const area<> a,
const uint i,
const double margin )

Move around a 2 by 4 grid of glyphs

1 2 3 4 5 6 7 8

given

  1. a center point located equidistant to 2, 3, 6, 7,
  2. cell width,
  3. and iteration or cell number [0,7]

Definition at line 148 of file a60-svg-grid-matrix-systems.h.

◆ to_point_in_3x3_matrix()

point_2t svg::to_point_in_3x3_matrix ( const area<> a,
const uint i,
const double margin,
const matrix_variant vnt = matrix_variant::slim )

Move around a three by three grid of glyphs

1 2 3 4 5 6 7 8 9

given

  1. a center point located at iteration 5,
  2. cell width,
  3. and iteration or cell number [0,8]

The centerweight matrix_variant has cells arranged as above. The other variant styles, distort the matrix as specified below.

Definition at line 60 of file a60-svg-grid-matrix-systems.h.

+ Here is the call graph for this function:

◆ to_point_in_matrix()

point_2t svg::to_point_in_matrix ( const area<> a,
const uint i,
const double margin )

Default matrix position.

Definition at line 230 of file a60-svg-grid-matrix-systems.h.

+ Here is the call graph for this function:

◆ to_string() [1/7]

const std::string & svg::to_string ( const color e)

Convert color to RGB color value string.

Definition at line 225 of file a60-svg-color.h.

◆ to_string() [2/7]

const std::string svg::to_string ( const color_qf klr)

Convert color_qf to string.

Definition at line 671 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ to_string() [3/7]

const std::string svg::to_string ( const color_qi klr)

Convert color_qi to string.

Definition at line 526 of file a60-svg-color.h.

+ Here is the call graph for this function:

◆ to_string() [4/7]

string svg::to_string ( const scale e)

Definition at line 141 of file a60-svg-render-state.h.

◆ to_string() [5/7]

const string svg::to_string ( const style & s)

Definition at line 190 of file a60-svg-base-types.h.

+ Here is the call graph for this function:

◆ to_string() [6/7]

const string svg::to_string ( const unit e)

Definition at line 41 of file a60-svg-base-types.h.

◆ to_string() [7/7]

string svg::to_string ( point_2t p)

Convert point_2t to string.

Definition at line 73 of file a60-svg.h.

◆ to_value_id_mmap()

value_id_ummap svg::to_value_id_mmap ( const id_value_umap & ivm,
value_set & uniquev )

Convert id_value_umap to value_id_mmap + set of unique values.

Definition at line 61 of file a60-svg-radial-arc.h.

◆ traverse_states()

const id_rstate svg::traverse_states ( const strings & values)

Roll through render states given in values squentially, index starts with zero.

Definition at line 363 of file a60-svg-render-state.h.

+ Here is the call graph for this function:

◆ union_vrange()

vrange svg::union_vrange ( const vrange & r1,
const vrange & r2 )

Union two ranges.

Definition at line 105 of file a60-svg.h.

◆ vertical_sync_roll_seq()

strings svg::vertical_sync_roll_seq ( const rect_element::data & drin,
const color klr,
size_t ,
double step = 10,
int blursz = 200,
int solidsz = 133,
double opac = 0.6 )

Simulated vertical roll, with fades. r == frame size.

Definition at line 271 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ wink_to_color_seq()

strings svg::wink_to_color_seq ( const rect_element::data & dr,
const color klr,
size_t fps,
double sec,
double twhen,
double maxclose,
double winksec )

wink sequence of duration sec, given fps to color klr starts on background transparent, so can use with an image behind. at duration twhen winks specific rectangle (r) this much (maxclose) for seconds (winksec)

Definition at line 154 of file a60-svg-sequences.h.

+ Here is the call graph for this function:

◆ zero_angle_north_ccw()

double svg::zero_angle_north_ccw ( double angled)

Zero degrees is top, going clockwise (cw).

Definition at line 566 of file a60-svg-render-basics.h.

◆ zero_angle_north_cw()

double svg::zero_angle_north_cw ( double angled)

Zero degrees is top, going clockwise (cw).

Definition at line 551 of file a60-svg-render-basics.h.

Variable Documentation

◆ cband_b

colorband svg::cband_b = std::make_tuple(color::blue, 34)
constexpr

Definition at line 42 of file a60-svg-color-band.h.

◆ cband_brown

colorband svg::cband_brown = std::make_tuple(color::duboisbrown5, 7)
constexpr

Definition at line 37 of file a60-svg-color-band.h.

◆ cband_bw

colorband svg::cband_bw = std::make_tuple(color::white, 2)
constexpr

Izzi palette-specific offsets for colorbands.

Definition at line 35 of file a60-svg-color-band.h.

◆ cband_g

colorband svg::cband_g = std::make_tuple(color::green, 21)
constexpr

Definition at line 41 of file a60-svg-color-band.h.

◆ cband_gray

colorband svg::cband_gray = std::make_tuple(color::white, 16)
constexpr

Definition at line 36 of file a60-svg-color-band.h.

◆ cband_o

colorband svg::cband_o = std::make_tuple(color::orange, 10)
constexpr

Definition at line 39 of file a60-svg-color-band.h.

◆ cband_p

colorband svg::cband_p = std::make_tuple(color::purple, 33)
constexpr

Definition at line 43 of file a60-svg-color-band.h.

◆ cband_r

colorband svg::cband_r = std::make_tuple(color::red, 17)
constexpr

Definition at line 38 of file a60-svg-color-band.h.

◆ cband_y

colorband svg::cband_y = std::make_tuple(color::hellayellow, 10)
constexpr

Definition at line 40 of file a60-svg-color-band.h.

◆ ciecam02_palette

const palette_qi<73> svg::ciecam02_palette
static

CIECAM02-UCS color space, perceptually different colors, equally spaced out.

Hand-picked values for a 67-68 BTIHA, aka cyberwar. Start with color constraints, generate 264 options, hand-pick to n=68. http://jnnnnn.github.io/category-colors-constrained.html

Definition at line 321 of file a60-svg-color-palette.h.

◆ color_max_size

uint svg::color_max_size = static_cast<uint>(color::last)
constexpr

Total number of enumerated colors.

Definition at line 221 of file a60-svg-color.h.

◆ colorbrewer2s3s_palette

const palette_qi<19> svg::colorbrewer2s3s_palette
static
Initial value:
=
{
color_qi(254,224,210), color_qi(252,146,114), color_qi(222,45,38),
color_qi(254,230,206), color_qi(253,174,107), color_qi(230,85,13),
color_qi(229,245,224), color_qi(161,217,155), color_qi(49,163,84),
color_qi(222,235,247), color_qi(158,202,225), color_qi(49,130,189),
color_qi(239,237,245), color_qi(188,189,220), color_qi(117,107,177),
color_qi(240,240,240), color_qi(189,189,189), color_qi(99,99,99),
}
Color quantified as integral RGB components in the range [0,255]. aka like Scalar in OpenCV.

ColorBrewer 2.0 https://colorbrewer2.org.

Single hue 3-class sequential, low to high

Definition at line 219 of file a60-svg-color-palette.h.

◆ colorbrewer2s7s_palette

const palette_qi<43> svg::colorbrewer2s7s_palette
static

Single hue 7-class sequential, low to high.

Definition at line 278 of file a60-svg-color-palette.h.

◆ colorbrewer2s9s_palette

const palette_qi<55> svg::colorbrewer2s9s_palette
static

Single hue 9-class sequential, low to high.

Definition at line 242 of file a60-svg-color-palette.h.

◆ izzi_hue_palette

const palette_qi<color_max_size - 20> svg::izzi_hue_palette
static

Only color no black and white or gray.

Definition at line 108 of file a60-svg-color-palette.h.

◆ izzi_palette

const palette_qi<color_max_size - 4> svg::izzi_palette
static

Default colors for izzi.

Definition at line 38 of file a60-svg-color-palette.h.

◆ jp_palette

const palette_qi<118> svg::jp_palette
static

◆ matrix_max_items

uint svg::matrix_max_items = 8
constexpr

Maximum number of individual items to be placed in grid cells. A 1x4 grid can contain up to 4 items. A 2x4 grid can contain up to 8 items. A 3x3 grid can contain up to 9 items.

Definition at line 25 of file a60-svg-grid-matrix-systems.h.