|
izzi
SVG SUBSET C++ API
|
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, configuration, 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 | link_element |
| 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 | PointEqual |
| struct | PointHash |
| 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 | 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. | |
| 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_qi = palette<color_qi, N> |
| template<std::size_t N> | |
| using | palette_qf = palette<color_qf, N> |
| using | color_qis = std::vector<color_qi> |
| Types for Color iteration and combinatorics. | |
| using | color_qfs = std::vector<color_qf> |
| using | value_type = long long |
| Hash map of unique id to (not necessarily) unique value. Use this for sorting by id. | |
| using | value_set = std::set<value_type> |
| 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 | value_id_ummap = std::unordered_multimap<value_type, string> |
| using | id_rstate_umap = std::unordered_map<string, id_rstate> |
| using | strings = std::vector<string> |
| using | vstrings = strings |
| using | vvstrings = std::vector<strings> |
| using | ushort = unsigned short |
| Base integer type: positive and negative, signed integral value. | |
| using | uint = unsigned int |
| using | ulong = unsigned long |
| using | ssize_type = int |
| using | space_type = double |
| Base floating point type. | |
| using | jsonstream = rj::PrettyWriter<rj::StringBuffer> |
| Aliases/using. | |
| using | point_2t = std::tuple<space_type, space_type> |
| Point (x,y) in 2D space, space_type defaults to double. | |
| using | point_2tn = std::tuple<ulong, point_2t> |
| Point (x,y) in 2D space with weight n. | |
| using | point_2ts = std::tuple<string, point_2t> |
| Named Point (x,y) in 2D space. | |
| using | vspace = std::vector<space_type> |
| Split range, so one dimension of (x,y) cartesian plane. | |
| using | srange = std::set<point_2t> |
| Latitude and Longitude Ranges. | |
| using | srangen = std::set<point_2tn> |
| using | vrange = std::vector<point_2t> |
| using | vrangen = std::vector<point_2tn> |
| using | vvranges = std::vector<vrange> |
| using | vrangenamed = std::vector<point_2ts> |
Functions | |
| const string | to_string (const unit e) |
| const string | to_string (const style &s) |
| 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) |
| 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. | |
| color_qis | make_color_band (const colorband &cb, const ushort neededh) |
| Forwarding function. | |
| color_qi | next_in_color_band (const colorband &cb, const ushort bandn=400) |
| Flip through color band colors. | |
| auto & | active_spectrum (const bool sortbyhuep=false) |
| Oklab https://bottosson.github.io/posts/oklab/. | |
| color_qi | random_color (const uint startoffset=0) |
| Random entry from array above. | |
| template<typename _Spectrm> | |
| color_qi | random_color (const _Spectrm &spectrm, const uint startoffset=0) |
| 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 | start_at_color (const color_qi klr) |
| Start at specified color bar entry point. | |
| const std::string & | to_string (const color e) |
| Convert color to RGB color value string. | |
| bool | operator== (const color_qi &c1, const color_qi &c2) |
| const std::string | to_string (const color_qi klr) |
| Convert color_qi to string. | |
| const std::string | to_string (const color_qf klr) |
| Convert color_qf to string. | |
| 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) |
| color_qf::ftype | color_qf_distance (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. | |
| bool | color_qf_lt (const color_qf &k1, const color_qf &k2) |
| Forwarding function. | |
| bool | operator== (const color_qf &c1, const color_qf &c2) |
| bool | operator< (const color_qf &c1, const color_qf &c2) |
| color_qf | mutate_color_qf (const color_qf &k) |
| Return a variant on saturation/value only. | |
| color_qi | combine_color_qi (const color_qi &a, const double ad, const color_qi &b, const double bd) |
| color_qi | average_color_qi (const color_qi &a, const color_qi &b) |
| Average two colors, return the result. | |
| 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. | |
| void | make_1_channel_insert (svg_element &obj, string insert1) |
| 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. | |
| void | make_2_channel_insert (svg_element &obj, string insert1, string insert2) |
| 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. /. | |
| 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. | |
| string | element_to_svg_insert (const string isvgpre) |
| Import svg file, convert it to svg_element for insertion. | |
| 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. | |
| svg_element | nest_inner_svg_element_centered (const svg_element &obj, const point_2t &p) |
| Take. | |
| svg_element | nest_inner_element (const element_base &eb, const point_2t &p, const area<> a, const string name, const bool centerp=true) |
| Take. | |
| 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 | make_tspan_y_from_string_by_token (string s, uint xpos, const char token=' ') |
| Make text span. | |
| const double | ctopspace (60) |
| const double | ltopspace (10) |
| Distance between label and top/bottom of line or text. | |
| const double | hdenom (a60::k::age_values.size()+1+1+1) |
| uint | get_xoffset (const string &id, const uint xstart, const double hspace) |
| Compute xoffset. | |
| svg::svg_element | h_chord_graph_labels (const string aggname, const svg::area<> a=svg::k::v1080p_h) |
| Grid, titles, labels for h_chord_graph. | |
| svg::svg_element | h_chord_graph (const vumids &cumulative, const string aggname, const area<> a=svg::k::v1080p_h, const double yscale=0.7, const uint rwidth=10) |
| void | render_metadata_aggregate_chord (const area<> a, const vumids &cumulative, const strings &namedkeyso, const string aggname) |
| Analyze metadata directory or subset of it and generate summary output for all in directory. | |
| void | analyze_metadata_aggregate_chord (const area<> a, const string field="", const string match="", const string wfield="", const string wvalue="") |
| Analyze metadata directory or subset of it, and generate summary output for all in directory. Iff field is non zero, then subset it to data files with field and match. | |
| void | analyze_metadata_aggregate_chord (const area<> a, const strings &namedkeys, const string aggname, const string wfield="", const string wvalue="") |
| Analyze metadata directory or subset of it, and generate summary output for all in directory. | |
| vrange | find_change_points (const vrange &vr) |
| Simplify sorted vrange by removing interior duplicates. | |
| vrange | find_visual_change_points (const vrange &points) |
| Tramsform change points to points where the y-axis (% visual complete) changes. | |
| vrange | find_tooltip_points (const vrange &points, const vspace &onlypoints) |
| Tramsform change points to points where the x-axis (time) matches a value in onlypoints. | |
| vrange | transform_to_graph_points (const vrange &points, const graph_rstate &gstate, const point_2t xrange, const point_2t yrange) |
| Map data points to cartestian points on graph area. | |
| group_element | make_line_graph_images (const vrange &points, const graph_rstate &gstate, const string imgprefix, const string imgpath="../filmstrip/", const string imgext=".webp") |
| Return set of images for image tooltips, one for each point. | |
| string | make_line_graph_markers (const vrange &points, const vrange &cpoints, const graph_rstate &gstate, const double radius, const string imgidbase="") |
| Return set of paths of marker shapes with text tooltips. | |
| svg_element | make_line_graph_annotations (const vrange &points, const graph_rstate &gstate, const double xscale=1, const double yscale=1, const typography typo=k::apercu_typo) |
| Axis Labels Axis X/Y Ticmarks X line increments. | |
| svg_element | make_line_graph (const vrange &points, const graph_rstate &gstate, const point_2t xrange, const point_2t yrange) |
| Returns a svg_element with the rendered line graph (char). Assumptions: vgrange x axis is monotonically increasing. | |
| svg_element | make_line_graph (const vrange &points, const vrange &tpoints, graph_rstate &gstate, const point_2t xrange, const point_2t yrange, const string metadata, script_element::scope scontext) |
| Line graph 3 needs more parameters. | |
| 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. | |
| 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_2x4_matrix (const area<> a, const uint i, const double margin) |
| 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_matrix (const area<> a, const uint i, const double margin) |
| Default matrix position. | |
| 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_circle (const std::string id, const area<> ma, const point_2t mcp, const uint radius, const style styl) |
| 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) |
| 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. | |
| void | make_markers (svg_element &obj) |
| Make black/white/wcag markers with sizes 4x4 and 2x2. | |
| 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. | |
| 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. | |
| 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) |
| 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) |
| 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) |
| point_2t & | get_radial_range () |
| point_2t | set_radial_range (const space_type rmin, const space_type rmax) |
| Convenience for setting radial range. | |
| double | get_angle (ssize_type pvalue, ssize_type pmax) |
| Transform a value on a range to an angle on the radial range. | |
| double | adjust_angle_rotation (const double dorig, const k::rrotation rot) |
| Adjust angle above to CW/CCW orientation. | |
| double | adjust_angle_at_orbit_for_distance (double r, double dist, const double minadjust=0.25) |
| uint | significant_digits_in (ssize_type maxval) |
| The number of significant digits in. | |
| ssize_type & | 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. | |
| void | set_label_spaces (ssize_type spaces) |
| Set the number of label spaces. | |
| string | make_label_for_value (string pname, ssize_type pvalue, const uint valuewidth=9) |
| Make radial labels. | |
| void | sort_strings_by_size (strings &ids) |
| Sort vectors of strings to largest length string first. (Or use set<>). | |
| 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_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_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_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_r (svg_element &obj, string text, const typography &typo, const int r, const point_2t origin, const double deg, const bool roriginp=false) |
| 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_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_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 | 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. | |
| 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. | |
| 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. | |
| vrange | radiate_hexagon_honeycomb (const point_2t origin, const double r, const uint n, const bool centerfilledp) |
| Compute set of points for a radial fill of hexograms centered at p. | |
| vspace | get_honeycomb_angles (const point_2t origin, const vrange &hexagons, const bool degreesp=true) |
| Compute set of angles, given points for a radial fill of hexograms centered at p. | |
| int & | get_min_ring_size () |
| The smallest (sattelite) radius size allowed in a kusama orbit. | |
| int | set_min_ring_size (const int sz) |
| By observation, type size 12pt = 5, 6pt = 2. | |
| double & | get_min_satellite_distance () |
| The minimum distance between satellites in high orbit. | |
| 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. | |
| 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}) |
| 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. | |
| 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) |
| 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. | |
| 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) |
| 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) |
| double | scale_proportional_to_area (double radius, double weight) |
| double | scale_proportional_to_weight (double radius, double weight) |
| text_element | style_text (const string text, const point_2t origin, const typography typo, const string xtransf="") |
| Text element at. | |
| text_element | style_text_r (const string text, const point_2t origin, const typography typo, const double deg, const point_2t rorigin, const k::rrotation rr=k::rrotation::none) |
| Text element at. | |
| void | styled_text (element_base &obj, const string text, const point_2t origin, const typography typo) |
| Text at. | |
| void | styled_text (element_base &obj, const string text, const point_2t origin, const typography typo, const string xform) |
| Text at. | |
| void | styled_text_r (element_base &obj, const string text, const point_2t origin, const typography typo, const double deg) |
| Text at. | |
| void | styled_text_r (element_base &obj, const string text, const point_2t origin, const typography typo, const double deg, const point_2t rorigin) |
| Text at. | |
| void | styled_text_link (element_base &obj, const string text, const point_2t origin, const typography typo, const string uri) |
| XXX Text at. | |
| void | sized_text (element_base &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty) |
| Text at size. | |
| void | sized_text_r (element_base &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. | |
| 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. | |
| line_element | make_line (const point_2t origin, const point_2t end, style s, const string dasharray="") |
| Line primitive. | |
| 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. | |
| 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. | |
| void | point_to_rect (element_base &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 (element_base &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="") |
| Center a rectangle at this point. | |
| circle_element | make_circle (const point_2t origin, style s, const space_type r=4, const string xform="") |
| Make circle element. | |
| 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_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_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 | place_ray_at_angle (svg_element &obj, const point_2t &origin, const point_2t &circump, const style &s, const string id="") |
| point_2t | get_circumference_point_r (const double angler, const double r, const point_2t origin) |
| Angle in radians. | |
| point_2t | get_circumference_point_d (const double ad, const double r, const point_2t origin) |
| Angle in degrees. | |
| double | zero_angle_north_cw (double angled) |
| Zero degrees is top, going clockwise (cw). | |
| double | zero_angle_north_ccw (double angled) |
| Zero degrees is top, going clockwise (cw). | |
| string | make_path_data_from_points (const vrange &lpoints) |
| Make single path segment. | |
| path_element | make_path (const string &pathda, const style &styl, const string id="", const bool selfclosingtagp=true, const string xattr="") |
| Draw path given serialized path data. Can be used to make pinstripes, 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. | |
| path_element | make_path_triangle (const point_2t origin, const style styl, const double r=4, const double angle=120, const bool selfclosingtagp=true, const string xattr="") |
| Center a triangle at this point. | |
| path_element | make_path_polygon (const point_2t origin, const style styl, const double r=4, const uint pointsn=8, const bool selfclosingtagp=true, const string xattr="") |
| 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) | |
| 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 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) | |
| 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. | |
| 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_crossed_lines (const point_2t origin, const style s, const double radius, const double tiltd=0.0) |
| Crossed lines, no fill. X marks the .... | |
| 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. | |
| group_element | make_hexagon_honeycomb (const point_2t origin, const double r, const uint hexn, const bool cfillp, const style styl, const string xform="") |
| Center rings of hexagons at this point. | |
| group_element | make_text_honeycomb (const point_2t origin, const double r, const uint hexn, const bool cfillp, const string s, const typography typo, const string xform="") |
| Center rings of text in a hexagon pattern at this point. | |
| svg_element | display_color_qis (const auto &klrs, const area<> a, const typography &typobase) |
| Make grid palette for display. NB. | |
| constexpr select | operator& (select __a, select __b) |
| constexpr select | operator| (select __a, select __b) |
| constexpr select | operator^ (select __a, select __b) |
| constexpr select | operator~ (select __a) |
| const select & | operator|= (select &__a, select __b) |
| const select & | operator&= (select &__a, select __b) |
| const select & | operator^= (select &__a, select __b) |
| void | set_select (select &a, const select &b) |
| Forwarding functions. | |
| void | clear_select (select &a, const select &b) |
| void | flip_select (select &a, const select &b) |
| string | to_string (const scale e) |
| color_rstate & | get_render_state () |
| Global state. | |
| id_rstate_umap & | get_id_rstate_cache () |
| 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. | |
| const id_rstate | get_id_rstate (const string id) |
| Given identifier/name/id, get corresponding id_rstate from cache. | |
| const id_rstate | traverse_states (const strings &values) |
| Roll through render states given in values squentially, index starts with zero. | |
| 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) |
| 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 | 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 | |
| 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) | |
| 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. | |
| 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. | |
| 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) |
| 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 | |
| void | string_replace (std::string &target, const std::string &match, const std::string &replace) |
| 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). | |
| double & | get_dpi () |
| Resolution of output display device. | |
| double | pt_to_px (const uint i=1) |
| Conversion between point size to pixels given dpi density. | |
| constexpr double | char_width_to_px (const uint sz) |
| Approximate pixel height of type of point size @sz. | |
| constexpr double | char_height_to_px (const uint sz) |
| Approximate pixel height of type of point size @sz. | |
| void | serialize_id_types_json (jsonstream &writer, const auto &ids, const string tag) |
| Serialize set of id_type. | |
| 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_object (const string input_file) |
| Load JSON file to in-memory DOM. | |
| rj::Document | deserialize_json_to_dom_array (const string input_file) |
| Load JSON file to in-memory DOM array. | |
| string | search_dom_for_string_field (const rj::Document &dom, const string finds) |
| Search DOM for string literals. | |
| int | search_dom_for_int_field (const rj::Document &dom, const string finds) |
| Search DOM for integer values. | |
| double | extract_dom_value_to_double (const rj::Value &v) |
| Extract from raw JSON value to double. | |
| 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. | |
| vspace | extract_object_keys_as_vspace (const string jdata, const string jobjpath) |
| Iterate over json object in data file and return keys as ints. | |
| string | to_string (point_2t p) |
| Convert point_2t to string. | |
| 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. | |
| vrange | union_vrange (const vrange &r1, const vrange &r2) |
| Union two ranges. | |
| 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. | |
| 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. | |
| vspace | narrow_vspace (const vspace &points, uint pown) |
| Truncate double to double with pown signifigant digits. | |
| space_type | distance_cartesian (const point_2t &p1, const point_2t &p2) |
| Find cartesian distance between two 2D points. | |
| bool | detect_collision (const point_2t &p1, const int r1, const point_2t &p2, const int r2) |
| vpoints | vrangenamed_to_points (const vrangenamed &inpoints) |
| Convert point_2ts to Point. | |
| vrangenamed | points_to_vrangenamed (const vpoints &inpoints) |
| Convert Point to point_2t. | |
Variables | |
| constexpr colorband | cband_bw = std::make_tuple(color::white, 2) |
| Izzi palette-specific offsets for colorbands. | |
| constexpr colorband | cband_gray = std::make_tuple(color::white, 16) |
| constexpr colorband | cband_brown = std::make_tuple(color::duboisbrown5, 7) |
| constexpr colorband | cband_r = std::make_tuple(color::red, 17) |
| constexpr colorband | cband_o = std::make_tuple(color::orange, 10) |
| constexpr colorband | cband_y = std::make_tuple(color::hellayellow, 10) |
| constexpr colorband | cband_g = std::make_tuple(color::green, 21) |
| constexpr colorband | cband_b = std::make_tuple(color::blue, 34) |
| constexpr colorband | cband_p = std::make_tuple(color::purple, 33) |
| static const palette_qi< color_max_size - 4 > | izzi_palette |
| Default colors for izzi. | |
| static const palette_qi< color_max_size - 20 > | izzi_hue_palette |
| Only color no black and white or gray. | |
| static const palette_qi< 118 > | jp_palette |
| Japan colors (118) https://en.wikipedia.org/wiki/Traditional_colors_of_Japan. | |
| static const palette_qi< 19 > | colorbrewer2s3s_palette |
| ColorBrewer 2.0 https://colorbrewer2.org. | |
| static const palette_qi< 55 > | colorbrewer2s9s_palette |
| Single hue 9-class sequential, low to high. | |
| static const palette_qi< 43 > | colorbrewer2s7s_palette |
| Single hue 7-class sequential, low to high. | |
| static const palette_qi< 73 > | ciecam02_palette |
| static const palette_qi< 61 > | ciecam16_palette |
| CIECAM16 61 color palette. | |
| static const palette_qi< 89 > | ciecam16j70_palette |
| CIECAM16 89-color palette, 8 sections x 11 colors each, fixed brightness at j=70 (8 bands x 11 samples) + none. | |
| constexpr uint | color_max_size = static_cast<uint>(color::last) |
| Total number of enumerated colors. | |
| const auto | lsz = 16 |
| const auto | asz = 12 |
| const auto | ssz = 10 |
| 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. | |
Scalable Vector Graphics (SVG) namespace
| 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.
| 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.
| using svg::palette_qi = palette<color_qi, N> |
Definition at line 32 of file a60-svg-color-palette.h.
| using svg::palette_qf = palette<color_qf, N> |
Definition at line 35 of file a60-svg-color-palette.h.
| using svg::color_qis = std::vector<color_qi> |
Types for Color iteration and combinatorics.
Definition at line 816 of file a60-svg-color.h.
| using svg::color_qfs = std::vector<color_qf> |
Definition at line 817 of file a60-svg-color.h.
| 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.
| using svg::value_set = std::set<value_type> |
Definition at line 28 of file a60-svg-radial-arc.h.
| 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.
| using svg::value_id_ummap = std::unordered_multimap<value_type, string> |
Definition at line 34 of file a60-svg-radial-arc.h.
| using svg::id_rstate_umap = std::unordered_map<string, id_rstate> |
Definition at line 310 of file a60-svg-render-state.h.
| using svg::strings = std::vector<string> |
| using svg::vstrings = strings |
| using svg::vvstrings = std::vector<strings> |
| using svg::ushort = unsigned short |
| using svg::ulong = unsigned long |
| using svg::ssize_type = int |
| using svg::space_type = double |
| using svg::jsonstream = rj::PrettyWriter<rj::StringBuffer> |
Aliases/using.
Definition at line 45 of file izzi-json-basics.h.
| using svg::point_2t = std::tuple<space_type, space_type> |
Point (x,y) in 2D space, space_type defaults to double.
Definition at line 22 of file izzi-points.h.
| using svg::point_2tn = std::tuple<ulong, point_2t> |
Point (x,y) in 2D space with weight n.
Definition at line 25 of file izzi-points.h.
| using svg::point_2ts = std::tuple<string, point_2t> |
Named Point (x,y) in 2D space.
Definition at line 28 of file izzi-points.h.
| using svg::vspace = std::vector<space_type> |
Split range, so one dimension of (x,y) cartesian plane.
Definition at line 41 of file izzi-points.h.
| using svg::srange = std::set<point_2t> |
Latitude and Longitude Ranges.
Definition at line 44 of file izzi-points.h.
| using svg::srangen = std::set<point_2tn> |
Definition at line 45 of file izzi-points.h.
| using svg::vrange = std::vector<point_2t> |
Definition at line 46 of file izzi-points.h.
| using svg::vrangen = std::vector<point_2tn> |
Definition at line 47 of file izzi-points.h.
| using svg::vvranges = std::vector<vrange> |
Definition at line 48 of file izzi-points.h.
| using svg::vrangenamed = std::vector<point_2ts> |
Definition at line 50 of file izzi-points.h.
|
strong |
Measurement abstraction for absolute (not relative) measurements.
| Enumerator | |
|---|---|
| meter | |
| m | 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.
|
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
Definition at line 41 of file a60-svg-color.h.
| enum svg::graph_mode : ushort |
Polyline/line options. 1: use one line with css dasharray and markers mid, end points 2: use two lines: one with css dasharray and no markerspoints, two with explicit marker paths and added text tooltips 3: use two lines and add js + image tooltips: like 2 above but add image tooltips, with js controlling image visibility.
| Enumerator | |
|---|---|
| chart_line_style_1 | |
| chart_line_style_2 | |
| chart_line_style_3 | |
Definition at line 35 of file a60-svg-graphs-line.h.
|
strong |
Grid style mode.
| Enumerator | |
|---|---|
| centerweight | |
| centerweightsvg | |
| veronica | |
| slim | |
Definition at line 29 of file a60-svg-grid-matrix-systems.h.
|
strong |
Selected or Active in render area. Make discrete element or layer (visible, outline, etc) if true. Used as a (visibility, outline, etc.) bitmask
Definition at line 27 of file a60-svg-render-state.h.
|
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 126 of file a60-svg-render-state.h.
| const string svg::to_string | ( | const unit | e | ) |
Definition at line 41 of file a60-svg-base-types.h.
| const string svg::to_string | ( | const style & | s | ) |
| 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.
| string svg::convert_to_utf8 | ( | string | in | ) |
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:Algorightm is HSV generation.
Definition at line 104 of file a60-svg-color-band.h.
Here is the call graph for this function:Forwarding function.
Definition at line 153 of file a60-svg-color-band.h.
Here is the call graph for this function:Flip through color band colors.
| bandn | is 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:| 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 color_qi as color bands use colors arranged in a fixed order with offsets in hue.
Definition at line 596 of file a60-svg-color-palette.h.
Here is the call graph for this function:Random entry from array above.
Definition at line 620 of file a60-svg-color-palette.h.
Here is the call graph for this function:| color_qi svg::random_color | ( | const _Spectrm & | spectrm, |
| const uint | startoffset = 0 ) |
Definition at line 632 of file a60-svg-color-palette.h.
Loop through color array starting at position c. Iff klr is not found, return color::none as the next color.
Definition at line 644 of file a60-svg-color-palette.h.
Here is the call graph for this function:Start at specified color bar entry point.
Definition at line 661 of file a60-svg-color-palette.h.
Here is the call graph for this function:| 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.
Definition at line 515 of file a60-svg-color.h.
| 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:| 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:Less than compare for color_qf.
Definition at line 677 of file a60-svg-color.h.
Definition at line 690 of file a60-svg-color.h.
| 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.
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:Forwarding function.
Definition at line 743 of file a60-svg-color.h.
Here is the call graph for this function:Definition at line 748 of file a60-svg-color.h.
Return a variant on saturation/value only.
Definition at line 763 of file a60-svg-color.h.
| 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.
Average two colors, return the result.
Definition at line 811 of file a60-svg-color.h.
Here is the call graph for this function:| 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.
| 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:| 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.
| 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:| 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. /.
| rlen | is 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:| 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.
| 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.
| 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.
| obj | is containing svg |
| origin | is where glyph placement is inside containing svg element. |
| origsize | is original file width/height constant |
| isize | is final width/height |
| isvg | is the raw svg string to insert, assumes _M_lifetime == false. |
| styl | is 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:| svg_element svg::nest_inner_svg_element_centered | ( | const svg_element & | obj, |
| const point_2t & | p ) |
Take.
| obj | as some kind of inner svg element, and embed it as a nested svg at a location centered at |
| pos | on the outer svg. Returns a svg_element that can then be add_element from outer svg. |
Definition at line 237 of file a60-svg-composite-and-layer-basics.h.
Here is the call graph for this function:| svg_element svg::nest_inner_element | ( | const element_base & | eb, |
| const point_2t & | p, | ||
| const area<> | a, | ||
| const string | name, | ||
| const bool | centerp = true ) |
Take.
| obj | as some kind of inner element_base, and embed it as a nested svg at a location centered at |
| pos | on the outer svg. Returns a svg_element that can then be add_element from outer svg. |
Definition at line 274 of file a60-svg-composite-and-layer-basics.h.
Here is the call graph for this function:| 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.
| slxt | is odd/even (left/right) |
| bleedin | is bleed size for one edge in inches. (1/8) |
| bleedxoffset | is distance from spine pushed outward. |
Definition at line 318 of file a60-svg-composite-and-layer-basics.h.
Here is the call graph for this function:| const double svg::ctopspace | ( | 60 | ) |
| const double svg::ltopspace | ( | 10 | ) |
Distance between label and top/bottom of line or text.
| const double svg::hdenom | ( | a60::k::age_values.size()+1+1+ | 1 | ) |
Compute xoffset.
Definition at line 43 of file a60-svg-graphs-chord.h.
| svg::svg_element svg::h_chord_graph_labels | ( | const string | aggname, |
| const svg::area<> | a = svg::k::v1080p_h ) |
Grid, titles, labels for h_chord_graph.
| yscale | == how much to vertically scale the bar graph from center. |
Definition at line 50 of file a60-svg-graphs-chord.h.
Here is the call graph for this function:| svg::svg_element svg::h_chord_graph | ( | const vumids & | cumulative, |
| const string | aggname, | ||
| const area<> | a = svg::k::v1080p_h, | ||
| const double | yscale = 0.7, | ||
| const uint | rwidth = 10 ) |
A chord diagram, flattened into a linear horizontal form.
Rendering set/subset of metadata with "playing" compound grammars.
The Vertical (roughly, in thirds): top is actual age graph middle is ages plotted on horizontal axes bottom is playing age graph, inverted.
And then a connecting line will be drawn from the actual age to the playing age.
The Horizontal: Use linear scaling for age values, instead of bell shaped scaling for glyph. have 10 values (00-09, ..., 90-99) + 100+ + unknown +ambiguous -> 13.
Process cumulative age values 1-3.
Process cumulative age values 4.
Definition at line 121 of file a60-svg-graphs-chord.h.
Here is the call graph for this function:| void svg::render_metadata_aggregate_chord | ( | const area<> | a, |
| const vumids & | cumulative, | ||
| const strings & | namedkeyso, | ||
| const string | aggname ) |
Analyze metadata directory or subset of it and generate summary output for all in directory.
Definition at line 402 of file a60-svg-graphs-chord.h.
Here is the call graph for this function:| void svg::analyze_metadata_aggregate_chord | ( | const area<> | a, |
| const string | field = "", | ||
| const string | match = "", | ||
| const string | wfield = "", | ||
| const string | wvalue = "" ) |
Analyze metadata directory or subset of it, and generate summary output for all in directory. Iff field is non zero, then subset it to data files with field and match.
Definition at line 448 of file a60-svg-graphs-chord.h.
Here is the call graph for this function:| void svg::analyze_metadata_aggregate_chord | ( | const area<> | a, |
| const strings & | namedkeys, | ||
| const string | aggname, | ||
| const string | wfield = "", | ||
| const string | wvalue = "" ) |
Analyze metadata directory or subset of it, and generate summary output for all in directory.
Definition at line 477 of file a60-svg-graphs-chord.h.
Here is the call graph for this function:Simplify sorted vrange by removing interior duplicates.
Definition at line 103 of file a60-svg-graphs-line.h.
Tramsform change points to points where the y-axis (% visual complete) changes.
| points | already simplified change points |
Definition at line 134 of file a60-svg-graphs-line.h.
Tramsform change points to points where the x-axis (time) matches a value in onlypoints.
| points | already simplified change points |
Definition at line 152 of file a60-svg-graphs-line.h.
| vrange svg::transform_to_graph_points | ( | const vrange & | points, |
| const graph_rstate & | gstate, | ||
| const point_2t | xrange, | ||
| const point_2t | yrange ) |
Map data points to cartestian points on graph area.
| data | points |
Definition at line 174 of file a60-svg-graphs-line.h.
Here is the call graph for this function:| group_element svg::make_line_graph_images | ( | const vrange & | points, |
| const graph_rstate & | gstate, | ||
| const string | imgprefix, | ||
| const string | imgpath = "../filmstrip/", | ||
| const string | imgext = ".webp" ) |
Return set of images for image tooltips, one for each point.
| aimg | is size of image embedded inside svg element. @pathprefix is the path to the directory with the store of images @idimgbase is the root name for what will be document level unique names of sequentially numbered images (say fximage-, for fximage-101 et al) Expected, zero filled imageid. 2025-06-26-android-15-ptablet-talkback-4usted-firefox_13188.webp |
Definition at line 219 of file a60-svg-graphs-line.h.
Here is the call graph for this function:| string svg::make_line_graph_markers | ( | const vrange & | points, |
| const vrange & | cpoints, | ||
| const graph_rstate & | gstate, | ||
| const double | radius, | ||
| const string | imgidbase = "" ) |
Return set of paths of marker shapes with text tooltips.
Definition at line 252 of file a60-svg-graphs-line.h.
Here is the call graph for this function:| svg_element svg::make_line_graph_annotations | ( | const vrange & | points, |
| const graph_rstate & | gstate, | ||
| const double | xscale = 1, | ||
| const double | yscale = 1, | ||
| const typography | typo = k::apercu_typo ) |
Axis Labels Axis X/Y Ticmarks X line increments.
| aplate | = total size of graph area |
| points | = vector of {x,y} points to graph |
| gstate | = graph render state |
| xscale | = scale x axis by this ammount (1000 if converting ms to s) |
| yscale | = scale y axis by this ammount |
| typo | = typography to use for labels |
Definition at line 367 of file a60-svg-graphs-line.h.
Here is the call graph for this function:| svg_element svg::make_line_graph | ( | const vrange & | points, |
| const graph_rstate & | gstate, | ||
| const point_2t | xrange, | ||
| const point_2t | yrange ) |
Returns a svg_element with the rendered line graph (char). Assumptions: vgrange x axis is monotonically increasing.
NB1: Axes and labels drawn in a separate pass (make_line_graph_annotations). NB2: Output file of x-axis point values for image tooltips if strategy = 3.
| aplate | = total size of graph area |
| points | = vector of {x,y} points to graph |
| gstate | = graph render state |
| xrange | = unified x-axis range for all graphs if multiplot |
| yrange | = unified y-axis range for all graphs if multiplot |
| metadata | = image filename prefix for tooltips if present |
Definition at line 552 of file a60-svg-graphs-line.h.
Here is the call graph for this function:| svg_element svg::make_line_graph | ( | const vrange & | points, |
| const vrange & | tpoints, | ||
| graph_rstate & | gstate, | ||
| const point_2t | xrange, | ||
| const point_2t | yrange, | ||
| const string | metadata, | ||
| script_element::scope | scontext ) |
Line graph 3 needs more parameters.
Definition at line 602 of file a60-svg-graphs-line.h.
Here is the call graph for this function:Cell size 3x3 for n items with margin spacing on either size.
Definition at line 34 of file a60-svg-grid-matrix-systems.h.
| 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
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:Move around a 2 by 4 grid of glyphs
1 2 3 4 5 6 7 8
given
Definition at line 148 of file a60-svg-grid-matrix-systems.h.
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.
| 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.
| n | is number of matrix cells, greater than one. |
| i | is from find_id_index with tag, so is an offset starting at zero. |
| centeredp | adjusts to the center of the cell, default is left aligned. |
| y | is what y axis to use. |
Definition at line 209 of file a60-svg-grid-matrix-systems.h.
Default matrix position.
Definition at line 230 of file a60-svg-grid-matrix-systems.h.
Here is the call graph for this function:| 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:| marker_element svg::make_marker_circle | ( | const std::string | id, |
| const area<> | ma, | ||
| const point_2t | mcp, | ||
| const uint | radius, | ||
| const style | styl ) |
| marker_element svg::make_marker_triangle | ( | const std::string | id, |
| const area<> | ma, | ||
| const point_2t | mcp, | ||
| const uint | radius, | ||
| const style | styl ) |
| marker_element svg::make_marker_x | ( | const std::string | id, |
| const area<> | ma, | ||
| const point_2t | mcp, | ||
| const uint | radius, | ||
| const style | styl ) |
| marker_element svg::make_marker_rect | ( | const std::string | id, |
| const area<> | ma, | ||
| const point_2t | mcp, | ||
| const style | styl ) |
| 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:| 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:| 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.
| 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.
| 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:| 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:| 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:| 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:| 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 45 of file a60-svg-radial-base.h.
| point_2t svg::set_radial_range | ( | const space_type | rmin, |
| const space_type | rmax ) |
Convenience for setting radial range.
Definition at line 53 of file a60-svg-radial-base.h.
Here is the call graph for this function:
|
inline |
Transform a value on a range to an angle on the radial range.
Definition at line 67 of file a60-svg-radial-base.h.
Here is the call graph for this function:
|
inline |
Adjust angle above to CW/CCW orientation.
Definition at line 78 of file a60-svg-radial-base.h.
Here is the call graph for this function:
|
inline |
Angle adjustment such that two points on the circumference path of radius
| r | from origin are a minimum of |
| dist | apart. |
NB: If it cannot be computed directly, returns
| minadjust,a | minimum adjustment angle that defaults to 0.25 degrees. |
Definition at line 97 of file a60-svg-radial-base.h.
Here is the call graph for this function:| uint svg::significant_digits_in | ( | ssize_type | maxval | ) |
The number of significant digits in.
| maxval. |
Definition at line 133 of file a60-svg-radial-base.h.
| 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 150 of file a60-svg-radial-base.h.
| void svg::set_label_spaces | ( | ssize_type | spaces | ) |
Set the number of label spaces.
Definition at line 159 of file a60-svg-radial-base.h.
Here is the call graph for this function:| string svg::make_label_for_value | ( | string | pname, |
| ssize_type | pvalue, | ||
| const uint | valuewidth = 9 ) |
Make radial labels.
Definition at line 165 of file a60-svg-radial-base.h.
| void svg::sort_strings_by_size | ( | strings & | ids | ) |
Sort vectors of strings to largest length string first. (Or use set<>).
Definition at line 181 of file a60-svg-radial-base.h.
| 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 191 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 204 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 217 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 230 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 256 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 299 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 336 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 352 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 372 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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 392 of file a60-svg-radial-base.h.
Here is the call graph for this function:| 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:| 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:| vrange svg::radiate_hexagon_honeycomb | ( | const point_2t | origin, |
| const double | r, | ||
| const uint | n, | ||
| const bool | centerfilledp ) |
Compute set of points for a radial fill of hexograms centered at p.
Definition at line 56 of file a60-svg-radial-fill-hexagon.h.
| vspace svg::get_honeycomb_angles | ( | const point_2t | origin, |
| const vrange & | hexagons, | ||
| const bool | degreesp = true ) |
Compute set of angles, given points for a radial fill of hexograms centered at p.
| degreesp | return results in degrees, not radians (default). |
Definition at line 141 of file a60-svg-radial-fill-hexagon.h.
| 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.
| 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:| 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.
| 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:| 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.
| 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:| 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
| origin | is center of the primary/base circle for kusama renderings. |
| kr | is of the kusama satellite circle on the ray. |
| rspace | is the distance between text/vector/glyph elements |
| rstart | is 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:| 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:| 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.
| radius | Length of line on a ray from origin to value. |
| satdistance | Multiple 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:| 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:| 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:| 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,
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.
| rstart | is 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:| 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:| double svg::scale_proportional_to_area | ( | double | radius, |
| double | weight ) |
Definition at line 25 of file a60-svg-render-basics.h.
| double svg::scale_proportional_to_weight | ( | double | radius, |
| double | weight ) |
Definition at line 38 of file a60-svg-render-basics.h.
| text_element svg::style_text | ( | const string | text, |
| const point_2t | origin, | ||
| const typography | typo, | ||
| const string | xtransf = "" ) |
Text element at.
| origin,with | style and optional transform. |
Definition at line 47 of file a60-svg-render-basics.h.
Here is the call graph for this function:| text_element svg::style_text_r | ( | const string | text, |
| const point_2t | origin, | ||
| const typography | typo, | ||
| const double | deg, | ||
| const point_2t | rorigin, | ||
| const k::rrotation | rr = k::rrotation::none ) |
Text element at.
| origin,rotated | with |
| deg | centered at |
| rorigin | in a |
| rr | direction. With typograph and style via |
| typo. |
Definition at line 64 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::styled_text | ( | element_base & | obj, |
| const string | text, | ||
| const point_2t | origin, | ||
| const typography | typo ) |
Text at.
| origin,with | style. |
Definition at line 89 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::styled_text | ( | element_base & | obj, |
| const string | text, | ||
| const point_2t | origin, | ||
| const typography | typo, | ||
| const string | xform ) |
Text at.
| origin,with | style and transform |
Definition at line 99 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::styled_text_r | ( | element_base & | obj, |
| const string | text, | ||
| const point_2t | origin, | ||
| const typography | typo, | ||
| const double | deg ) |
Text at.
| origin,with | style and ... a transformation=rotation of |
| deg | about origin. |
Definition at line 115 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::styled_text_r | ( | element_base & | obj, |
| const string | text, | ||
| const point_2t | origin, | ||
| const typography | typo, | ||
| const double | deg, | ||
| const point_2t | rorigin ) |
Text at.
| origin,with | style and ... a transformation=rotation of |
| deg | about |
| rorigin. |
Definition at line 131 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::styled_text_link | ( | element_base & | obj, |
| const string | text, | ||
| const point_2t | origin, | ||
| const typography | typo, | ||
| const string | uri ) |
XXX Text at.
| origin,with | style and link. |
Definition at line 148 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::sized_text | ( | element_base & | obj, |
| svg::typography | typo, | ||
| const int | sz, | ||
| const string | text, | ||
| const int | tx, | ||
| const int | ty ) |
Text at size.
Definition at line 187 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::sized_text_r | ( | element_base & | 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 202 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 217 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 247 of file a60-svg-render-basics.h.
Here is the call graph for this function:| line_element svg::make_line | ( | const point_2t | origin, |
| const point_2t | end, | ||
| style | s, | ||
| const string | dasharray = "" ) |
Line primitive.
Definition at line 294 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 311 of file a60-svg-render-basics.h.
Here is the call graph for this function:| polyline_element svg::make_polyline | ( | const vrange & | points, |
| const style | s, | ||
| const stroke_style | sstyle = { } ) |
Polyline primitive.
Definition at line 322 of file a60-svg-render-basics.h.
| 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 336 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 358 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::point_to_rect | ( | element_base & | obj, |
| const point_2t | origin, | ||
| style | s, | ||
| double | width = 4, | ||
| double | height = 4, | ||
| const string | filterstr = "" ) |
Rectangle at this point.
Definition at line 374 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::point_to_rect_centered | ( | element_base & | 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 385 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 396 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 412 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 425 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 495 of file a60-svg-render-basics.h.
Here is the call graph for this function:| void svg::place_ray_at_angle | ( | svg_element & | obj, |
| const point_2t & | origin, | ||
| const point_2t & | circump, | ||
| const style & | s, | ||
| const string | id = "" ) |
| point_2t svg::get_circumference_point_r | ( | const double | angler, |
| const double | r, | ||
| const point_2t | origin ) |
Angle in radians.
Definition at line 551 of file a60-svg-render-basics.h.
Angle in degrees.
Definition at line 563 of file a60-svg-render-basics.h.
Here is the call graph for this function:| double svg::zero_angle_north_cw | ( | double | angled | ) |
Zero degrees is top, going clockwise (cw).
Definition at line 573 of file a60-svg-render-basics.h.
| double svg::zero_angle_north_ccw | ( | double | angled | ) |
Zero degrees is top, going clockwise (cw).
Definition at line 588 of file a60-svg-render-basics.h.
| string svg::make_path_data_from_points | ( | const vrange & | lpoints | ) |
Make single path segment.
Definition at line 600 of file a60-svg-render-basics.h.
Here is the call graph for this function:| path_element svg::make_path | ( | const string & | pathda, |
| const style & | styl, | ||
| const string | id = "", | ||
| const bool | selfclosingtagp = true, | ||
| const string | xattr = "" ) |
Draw path given serialized path data. Can be used to make pinstripes, 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 624 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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, | ||
| const string | xattr = "" ) |
Center a triangle at this point.
Definition at line 651 of file a60-svg-render-basics.h.
Here is the call graph for this function:| path_element svg::make_path_polygon | ( | const point_2t | origin, |
| const style | styl, | ||
| const double | r = 4, | ||
| const uint | pointsn = 8, | ||
| const bool | selfclosingtagp = true, | ||
| const string | xattr = "" ) |
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 673 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 702 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 721 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 747 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 759 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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 808 of file a60-svg-render-basics.h.
Here is the call graph for this function:| 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.
| tiltd | can rotate. |
Definition at line 833 of file a60-svg-render-basics.h.
Here is the call graph for this function:| group_element svg::make_hexagon_honeycomb | ( | const point_2t | origin, |
| const double | r, | ||
| const uint | hexn, | ||
| const bool | cfillp, | ||
| const style | styl, | ||
| const string | xform = "" ) |
Center rings of hexagons at this point.
| origin | is the center point |
| r | is the radius/side length of hexagon. |
| hexn | is the number of hexagons total |
| cfillp | is the center of the hexagon filled or open |
| styl | apply as style to this element |
| xform | any optional transform |
Definition at line 852 of file a60-svg-render-basics.h.
Here is the call graph for this function:| group_element svg::make_text_honeycomb | ( | const point_2t | origin, |
| const double | r, | ||
| const uint | hexn, | ||
| const bool | cfillp, | ||
| const string | s, | ||
| const typography | typo, | ||
| const string | xform = "" ) |
Center rings of text in a hexagon pattern at this point.
| origin | is the center point |
| r | is the radius/side length of hexagon. |
| hexn | is the number of hexagons total |
| cfillp | is the center of the hexagon filled or open |
| s | is the text |
| typo | is the typography for the text |
| xform | any optional transform |
Definition at line 886 of file a60-svg-render-basics.h.
Here is the call graph for this function:| svg_element svg::display_color_qis | ( | const auto & | klrs, |
| const area<> | a, | ||
| const typography & | typobase ) |
Make grid palette for display. NB.
| klrs | can be color_qis or array/palette. |
Definition at line 927 of file a60-svg-render-basics.h.
Here is the call graph for this function:Definition at line 62 of file a60-svg-render-state.h.
Definition at line 70 of file a60-svg-render-state.h.
Definition at line 77 of file a60-svg-render-state.h.
Definition at line 84 of file a60-svg-render-state.h.
Definition at line 91 of file a60-svg-render-state.h.
Definition at line 95 of file a60-svg-render-state.h.
Definition at line 99 of file a60-svg-render-state.h.
Forwarding functions.
Definition at line 104 of file a60-svg-render-state.h.
Definition at line 108 of file a60-svg-render-state.h.
Definition at line 112 of file a60-svg-render-state.h.
| string svg::to_string | ( | const scale | e | ) |
Definition at line 140 of file a60-svg-render-state.h.
| color_rstate & svg::get_render_state | ( | ) |
Global state.
Definition at line 281 of file a60-svg-render-state.h.
| id_rstate_umap & svg::get_id_rstate_cache | ( | ) |
Definition at line 314 of file a60-svg-render-state.h.
Add value to cache with base style of styl, colors klr, visibility vis.
Definition at line 323 of file a60-svg-render-state.h.
Here is the call graph for this function:| const id_rstate svg::get_id_rstate | ( | const string | id | ) |
Given identifier/name/id, get corresponding id_rstate from cache.
Definition at line 336 of file a60-svg-render-state.h.
Here is the call graph for this function:Roll through render states given in values squentially, index starts with zero.
Definition at line 362 of file a60-svg-render-state.h.
Here is the call graph for this function:| 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:| 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:| 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:| 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:| 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:| 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:| 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:
Simplify to:
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:| 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:
|
inline |
| 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 ) |
| double & svg::get_dpi | ( | ) |
| double svg::pt_to_px | ( | const uint | i = 1 | ) |
|
constexpr |
|
constexpr |
| 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.
| rj::Document svg::deserialize_json_string_to_dom | ( | const string & | json | ) |
Deserialize input string.
Definition at line 78 of file izzi-json-basics.h.
| 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:| 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:| 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:| 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.
| 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.
| 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.
| 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:| vspace svg::extract_object_keys_as_vspace | ( | const string | jdata, |
| const string | jobjpath ) |
Iterate over json object in data file and return keys as ints.
Definition at line 268 of file izzi-json-basics.h.
Here is the call graph for this function:| string svg::to_string | ( | point_2t | p | ) |
Convert point_2t to string.
Definition at line 32 of file izzi-points.h.
| 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 55 of file izzi-points.h.
Union two ranges.
Definition at line 68 of file izzi-points.h.
For each dimension of vrnage, find min/max and return (xmax, ymax) NB: Assumes zero is min.
Definition at line 80 of file izzi-points.h.
| 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 115 of file izzi-points.h.
Here is the call graph for this function:Truncate double to double with pown signifigant digits.
Definition at line 128 of file izzi-points.h.
| space_type svg::distance_cartesian | ( | const point_2t & | p1, |
| const point_2t & | p2 ) |
Find cartesian distance between two 2D points.
Definition at line 148 of file izzi-points.h.
| vpoints svg::vrangenamed_to_points | ( | const vrangenamed & | inpoints | ) |
Definition at line 215 of file izzi-points.h.
| vrangenamed svg::points_to_vrangenamed | ( | const vpoints & | inpoints | ) |
Definition at line 228 of file izzi-points.h.
|
constexpr |
Izzi palette-specific offsets for colorbands.
Definition at line 35 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 36 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 37 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 38 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 39 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 40 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 41 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 42 of file a60-svg-color-band.h.
|
constexpr |
Definition at line 43 of file a60-svg-color-band.h.
|
static |
Default colors for izzi.
Definition at line 38 of file a60-svg-color-palette.h.
|
static |
Only color no black and white or gray.
Definition at line 108 of file a60-svg-color-palette.h.
|
static |
Japan colors (118) https://en.wikipedia.org/wiki/Traditional_colors_of_Japan.
Definition at line 170 of file a60-svg-color-palette.h.
|
static |
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.
|
static |
Single hue 9-class sequential, low to high.
Definition at line 242 of file a60-svg-color-palette.h.
|
static |
Single hue 7-class sequential, low to high.
Definition at line 278 of file a60-svg-color-palette.h.
|
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.
|
static |
CIECAM16 61 color palette.
CIECAM16-UCS color space, perceptually different colors, equally spaced out.
DeepSeek v1: generate a 60 item CIECAM16 color palette with no grays, formatted in RGB (r, g, b) values. Each color includes its approximate CIECAM16 parameters (J, C, h) for perceptual consistency.
DeepSeek v2: generate a 88-color CIECAM16 palette with fixed lightness (J=70), organized into 8 hue categories (6 colors each) plus 40 high-impact bonus colors. No whites/blacks/grays are included.
DeepSeek v3: generate a 88-color CIECAM16 palette with fixed lightness (J=70), organized into 8 hue categories (11 colors each), formatted as RGB (r,g,b). No whites/blacks/grays are included.
Definition at line 384 of file a60-svg-color-palette.h.
|
static |
CIECAM16 89-color palette, 8 sections x 11 colors each, fixed brightness at j=70 (8 bands x 11 samples) + none.
Definition at line 470 of file a60-svg-color-palette.h.
|
constexpr |
Total number of enumerated colors.
Definition at line 221 of file a60-svg-color.h.
| const auto svg::lsz = 16 |
Definition at line 37 of file a60-svg-graphs-chord.h.
| const auto svg::asz = 12 |
Definition at line 38 of file a60-svg-graphs-chord.h.
| const auto svg::ssz = 10 |
Definition at line 39 of file a60-svg-graphs-chord.h.
|
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.