27#include <unordered_map>
44 const std::string& replace)
47 while((pos = target.find(match, pos)) != std::string::npos)
49 target.replace(pos, match.length(), replace);
50 pos += replace.length();
71 double rmultp(nceil - nfloor);
72 double valnum(value - min);
73 double valdenom(max - min);
74 double weightn = (rmultp * (valnum / valdenom)) + nfloor;
83 static double dpi(96.0);
100 constexpr double dpimult = 1.33;
101 return std::lround(i * dpimult);
136constexpr double pi(3.14159265358979323846);
constexpr double pi(3.14159265358979323846)
constexpr char quote('"')
constexpr char comma(',')
constexpr char newline('\n')
constexpr char space(' ')
Formatting character constants.
constexpr char hyphen('-')
unsigned short ushort
Base integer type: positive and negative, signed integral value.
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).
void string_replace(std::string &target, const std::string &match, const std::string &replace)
double pt_to_px(const uint i=1)
Conversion between point size to pixels given dpi density.
double space_type
Base floating point type.
std::vector< strings > vvstrings
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.
double & get_dpi()
Resolution of output display device.
std::vector< string > strings