izzi
SVG SUBSET C++ API
Loading...
Searching...
No Matches
a60-svg.h File Reference
#include <cstddef>
#include <cmath>
#include <algorithm>
#include <array>
#include <tuple>
#include <string>
#include <vector>
#include <set>
#include <unordered_map>
#include <sstream>
#include "a60-svg-color.h"
#include "a60-svg-color-palette.h"
#include "a60-svg-color-band.h"
#include "a60-svg-base-types.h"
#include "a60-svg-constants.h"
#include "a60-svg-elements.h"
#include "a60-svg-elements-components.h"
#include "a60-svg-render-state.h"
#include "a60-svg-render-basics.h"
#include "a60-svg-composite-and-layer-basics.h"
#include "a60-svg-sequences.h"
+ Include dependency graph for a60-svg.h:

Go to the source code of this file.

Classes

class  svg::string
 STL class. More...
 

Namespaces

namespace  svg
 
namespace  svg::constants
 

Typedefs

using svg::point_2t = std::tuple<space_type, space_type>
 Point (x,y) in 2D space.
 
using svg::point_2tn = std::tuple<point_2t, ssize_type>
 Point (x,y) in 2D space with weight n.
 
using svg::space_type = double
 Base floating point type.
 
using svg::srange = std::set<point_2t>
 Latitude and Longitude Ranges.
 
using svg::ssize_type = int
 
using svg::strings = std::vector<string>
 
using svg::uint = unsigned int
 
using svg::ulong = unsigned long
 
using svg::ushort = unsigned short
 Base integer type: positive and negative, signed integral value.
 
using svg::vrange = std::vector<point_2t>
 
using svg::vspace = std::vector<double>
 Split range, so one dimension of (x,y) cartesian plane.
 
using svg::vstrings = strings
 
using svg::vvranges = std::vector<vrange>
 
using svg::vvstrings = std::vector<strings>
 

Functions

constexpr double svg::char_height_to_px (const uint sz)
 Approximate pixel height of type of point size @sz.
 
constexpr double svg::char_width_to_px (const uint sz)
 Approximate pixel height of type of point size @sz.
 
constexpr char svg::constants::comma (',')
 
bool svg::detect_collision (const point_2t &p1, const int r1, const point_2t &p2, const int r2)
 
space_type svg::distance_cartesian (const point_2t &p1, const point_2t &p2)
 Find cartesian distance between two 2D points.
 
vrange svg::find_vrange_change_points (const vrange &vr)
 Simplify sorted vrange by removing interior duplicates.
 
double & svg::get_dpi ()
 Resolution of output display device.
 
constexpr char svg::constants::hyphen ('-')
 
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.
 
point_2t svg::max_vrange (vspace &xpoints, vspace &ypoints, const uint pown)
 For each dimension of vrnage, find min/max and return (xmax, ymax) NB: Assumes zero is min.
 
vspace svg::narrow_vspace (const vspace &points, uint pown)
 Truncate double to double with pown signifigant digits.
 
constexpr char svg::constants::newline ('\n')
 
constexpr double svg::constants::pi (3.14159265358979323846)
 
double svg::pt_to_px (const uint i=1)
 Conversion between point size to pixels given dpi density.
 
constexpr char svg::constants::quote ('"')
 
double svg::scale_value_on_range (const ssize_type value, const ssize_type min, const ssize_type max, const ssize_type nfloor, const ssize_type nceil)
 Scale value from min to max on range (nfloor, nceil).
 
constexpr char svg::constants::space (' ')
 Formatting character constants.
 
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.
 
void svg::string_replace (std::string &target, const std::string &match, const std::string &replace)
 
constexpr char svg::constants::tab ('\t')
 
string svg::to_string (point_2t p)
 Convert point_2t to string.
 
vrange svg::union_vrange (const vrange &r1, const vrange &r2)
 Union two ranges.