izzi
SVG SUBSET C++ API
|
Go to the source code of this file.
Namespaces | |
namespace | svg |
Functions | |
svg_element | svg::display_color_qis (const auto &klrs, const area<> a, const typography &typobase) |
Make grid palette for display. NB. | |
point_2t | svg::get_circumference_point_d (const double ad, const double r, const point_2t origin) |
Angle in degrees. | |
point_2t | svg::get_circumference_point_r (const double angler, const double r, const point_2t origin) |
Angle in radians. | |
circle_element | svg::make_circle (const point_2t origin, style s, const space_type r=4, const string xform="") |
Make circle element. | |
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 .... | |
line_element | svg::make_line (const point_2t origin, const point_2t end, style s, const string dasharray="") |
Line primitive. | |
path_element | svg::make_path (const string &pathda, const style &styl, const string name="", const bool selfclosingtagp=true) |
Draw path given serialized path data. Assumes pinstripe, ie top and bottom line layers. top style defaults: fill opac(0), stroke opac(1), stroke sz 1 bottom style defaults: fill opac(0), stroke opac(1), stroke sz 1.25. | |
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) | |
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. | |
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) | |
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. | |
string | svg::make_path_data_from_points (const vrange &lpoints) |
Make single path segment. | |
path_element | svg::make_path_octogon (const point_2t origin, const style styl, const double r=4, const uint pointsn=8) |
Center an octogon at this point. radius 4 is pixels to draw out from center point. pointsn is number of points to draw (8 for octogon) | |
path_element | svg::make_path_triangle (const point_2t origin, const style styl, const double r=4, const double angle=120, const bool selfclosingtagp=true) |
Center a triangle at this point. | |
polyline_element | svg::make_polyline (const vrange &points, const style s, const stroke_style sstyle={ }) |
Polyline primitive. | |
rect_element | svg::make_rect (const point_2t origin, const style s, const area<> a, const string filterstr="") |
Create rect_element at origin. | |
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. | |
void | svg::place_ray_at_angle (svg_element &obj, const point_2t &origin, const point_2t &circump, const style &s, const string id="") |
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). | |
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). | |
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. | |
void | svg::point_to_octogon (svg_element &obj, const point_2t origin, const style s, const double r=4) |
Center an octogon at this point. | |
void | svg::point_to_rect (svg_element &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="") |
Rectangle at this point. | |
void | svg::point_to_rect_centered (svg_element &obj, const point_2t origin, style s, double width=4, double height=4, const string filterstr="") |
Center a rectangle at this point. | |
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. | |
void | svg::point_to_triangle (svg_element &obj, const point_2t origin, const style s, const double r=4, const double angle=120) |
Center a triangle at this point. | |
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. | |
double | svg::scale_proportional_to_area (double radius, double weight) |
double | svg::scale_proportional_to_weight (double radius, double weight) |
void | svg::sized_text (svg_element &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty) |
Text at size. | |
void | svg::sized_text_r (svg_element &obj, svg::typography typo, const int sz, const string text, const int tx, const int ty, const double deg) |
Text at size, with a transformation=rotation. | |
text_element | svg::style_text (const string text, const point_2t origin, const typography typo) |
Text elemetn at. | |
void | svg::styled_text (svg_element &obj, const string text, const point_2t origin, const typography typo) |
Text at. | |
void | svg::styled_text (svg_element &obj, const string text, const point_2t origin, const typography typo, const string xform) |
Text at. | |
void | svg::styled_text_link (svg_element &obj, const string text, const point_2t origin, const typography typo, const string uri) |
XXX Text at. | |
void | svg::styled_text_r (svg_element &obj, const string text, const point_2t origin, const typography typo, const double deg) |
Text at. | |
void | svg::styled_text_r (svg_element &obj, const string text, const point_2t origin, const typography typo, const double deg, const point_2t rorigin) |
Text at. | |
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. | |
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. | |
double | svg::zero_angle_north_ccw (double angled) |
Zero degrees is top, going clockwise (cw). | |
double | svg::zero_angle_north_cw (double angled) |
Zero degrees is top, going clockwise (cw). | |