NovaSVG 0.11.5
An SVG library
Loading...
Searching...
No Matches
svg.h File Reference
#include <cstdint>
#include <memory>
#include <string>
#include <cctype>
#include <vector>
#include "../config.h"
#include <stb/color.hpp>
#include <stb/image.hpp>
#include <stb/outline.hpp>
#include "../vg/geometry.h"
#include "foreign_object.h"
Include dependency graph for svg.h:

Go to the source code of this file.

Classes

class  nova::svg::node
class  nova::svg::text_node
class  nova::svg::element
class  nova::svg::document
struct  nova::svg::text_metrics
 How big a piece of text is, measured the way a <text> element is laid out. More...

Namespaces

namespace  nova
namespace  nova::vg
namespace  nova::svg

Macros

#define NOVA_VERSION_MAJOR   0
#define NOVA_VERSION_MINOR   11
#define NOVA_VERSION_PATCH   5
#define NOVA_VERSION_ENCODE(major, minor, patch)
#define NOVA_VERSION   NOVA_VERSION_ENCODE(NOVA_VERSION_MAJOR, NOVA_VERSION_MINOR, NOVA_VERSION_PATCH)
#define NOVA_VERSION_XSTRINGIZE(major, minor, patch)
#define NOVA_VERSION_STRINGIZE(major, minor, patch)
#define NOVA_VERSION_STRING   NOVA_VERSION_STRINGIZE(NOVA_VERSION_MAJOR, NOVA_VERSION_MINOR, NOVA_VERSION_PATCH)

Typedefs

using nova::svg::node_list = std::vector<node>
using nova::svg::element_list = std::vector<element>

Functions

int nova::svg::version ()
 Returns the version of the novasvg library encoded in a single integer.
std::string nova::svg::version_string ()
 Returns the novasvg library version as a human-readable string in "X.Y.Z" format.
bool nova::svg::is_valid_selector (const std::string &selector)
 Measures utf8_text with the same font lookup, shaping and kerning that <text> uses.
text_metrics nova::svg::measure_text (const std::string &utf8_text, const std::string &font_family, float font_size, bool bold=false, bool italic=false)
text_metrics nova::svg::measure_text (const std::string &utf8_text, const std::string &font_family, float font_size, int weight, bool italic=false)
 The same, for a numeric font-weight (300, 550, 700: a variable font is set to that weight).

Macro Definition Documentation

◆ NOVA_VERSION

Definition at line 43 of file svg.h.

◆ NOVA_VERSION_ENCODE

#define NOVA_VERSION_ENCODE ( major,
minor,
patch )
Value:
(((major) * 10000) + ((minor) * 100) + ((patch) * 1))

Definition at line 42 of file svg.h.

◆ NOVA_VERSION_MAJOR

#define NOVA_VERSION_MAJOR   0

Definition at line 38 of file svg.h.

◆ NOVA_VERSION_MINOR

#define NOVA_VERSION_MINOR   11

Definition at line 39 of file svg.h.

◆ NOVA_VERSION_PATCH

#define NOVA_VERSION_PATCH   5

Definition at line 40 of file svg.h.

◆ NOVA_VERSION_STRING

Definition at line 47 of file svg.h.

◆ NOVA_VERSION_STRINGIZE

#define NOVA_VERSION_STRINGIZE ( major,
minor,
patch )
Value:
NOVA_VERSION_XSTRINGIZE(major, minor, patch)
#define NOVA_VERSION_XSTRINGIZE(major, minor, patch)
Definition svg.h:45

Definition at line 46 of file svg.h.

◆ NOVA_VERSION_XSTRINGIZE

#define NOVA_VERSION_XSTRINGIZE ( major,
minor,
patch )
Value:
#major"."#minor"."#patch

Definition at line 45 of file svg.h.