NovaSVG 0.10.0
A header-only SVG library
Loading...
Searching...
No Matches
novasvg.h File Reference
#include <cstdint>
#include <memory>
#include <string>
#include <cctype>
#include <vector>
#include "detail/color.h"
#include "detail/font.h"
#include "detail/bitmap.h"
#include <cstring>
#include <fstream>
#include <cmath>
#include "detail/canvas.h"
#include "detail/svgelement.h"
#include "detail/svgparser.hpp"
Include dependency graph for novasvg.h:

Go to the source code of this file.

Classes

class  novasvg::Box
 Represents a 2D axis-aligned bounding box. More...
 
class  novasvg::Matrix
 Represents a 2D transformation matrix. More...
 
class  novasvg::Node
 
class  novasvg::TextNode
 
class  novasvg::Element
 
class  novasvg::Document
 

Namespaces

namespace  novasvg
 Main namespace for the NovaSVG library.
 
namespace  novasvg::render
 

Macros

#define NOVASVG_INLINE   inline
 
#define NOVASVG_EXPORT
 
#define NOVASVG_IMPORT
 
#define NOVASVG_API   NOVASVG_IMPORT
 
#define NOVASVG_MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define NOVASVG_MIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define NOVASVG_VERSION_MAJOR   0
 
#define NOVASVG_VERSION_MINOR   10
 
#define NOVASVG_VERSION_PATCH   0
 
#define NOVASVG_VERSION_ENCODE(major, minor, patch)   (((major) * 10000) + ((minor) * 100) + ((patch) * 1))
 
#define NOVASVG_VERSION   NOVASVG_VERSION_ENCODE(NOVASVG_VERSION_MAJOR, NOVASVG_VERSION_MINOR, NOVASVG_VERSION_PATCH)
 
#define NOVASVG_VERSION_XSTRINGIZE(major, minor, patch)   #major"."#minor"."#patch
 
#define NOVASVG_VERSION_STRINGIZE(major, minor, patch)   NOVASVG_VERSION_XSTRINGIZE(major, minor, patch)
 
#define NOVASVG_VERSION_STRING   NOVASVG_VERSION_STRINGIZE(NOVASVG_VERSION_MAJOR, NOVASVG_VERSION_MINOR, NOVASVG_VERSION_PATCH)
 

Typedefs

typedef void(* novasvg_destroy_func_t) (void *closure)
 Callback for cleaning up resources.
 
typedef void(* novasvg_write_func_t) (void *closure, void *data, int size)
 A function pointer type for a write callback.
 
using novasvg::NodeList = std::vector< Node >
 
using novasvg::ElementList = std::vector< Element >
 

Functions

int novasvg::version ()
 Returns the version of the novasvg library encoded in a single integer.
 
std::string novasvg::versionString ()
 Returns the novasvg library version as a human-readable string in "X.Y.Z" format.
 

Macro Definition Documentation

◆ NOVASVG_API

#define NOVASVG_API   NOVASVG_IMPORT

Definition at line 67 of file novasvg.h.

◆ NOVASVG_EXPORT

#define NOVASVG_EXPORT

Definition at line 51 of file novasvg.h.

◆ NOVASVG_IMPORT

#define NOVASVG_IMPORT

Definition at line 52 of file novasvg.h.

◆ NOVASVG_INLINE

#define NOVASVG_INLINE   inline

Definition at line 42 of file novasvg.h.

◆ NOVASVG_MAX

#define NOVASVG_MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 86 of file novasvg.h.

◆ NOVASVG_MIN

#define NOVASVG_MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 89 of file novasvg.h.

◆ NOVASVG_VERSION

Definition at line 97 of file novasvg.h.

◆ NOVASVG_VERSION_ENCODE

#define NOVASVG_VERSION_ENCODE (   major,
  minor,
  patch 
)    (((major) * 10000) + ((minor) * 100) + ((patch) * 1))

Definition at line 96 of file novasvg.h.

◆ NOVASVG_VERSION_MAJOR

#define NOVASVG_VERSION_MAJOR   0

Definition at line 92 of file novasvg.h.

◆ NOVASVG_VERSION_MINOR

#define NOVASVG_VERSION_MINOR   10

Definition at line 93 of file novasvg.h.

◆ NOVASVG_VERSION_PATCH

#define NOVASVG_VERSION_PATCH   0

Definition at line 94 of file novasvg.h.

◆ NOVASVG_VERSION_STRING

Definition at line 101 of file novasvg.h.

◆ NOVASVG_VERSION_STRINGIZE

#define NOVASVG_VERSION_STRINGIZE (   major,
  minor,
  patch 
)    NOVASVG_VERSION_XSTRINGIZE(major, minor, patch)

Definition at line 100 of file novasvg.h.

◆ NOVASVG_VERSION_XSTRINGIZE

#define NOVASVG_VERSION_XSTRINGIZE (   major,
  minor,
  patch 
)    #major"."#minor"."#patch

Definition at line 99 of file novasvg.h.

Typedef Documentation

◆ novasvg_destroy_func_t

typedef void(* novasvg_destroy_func_t) (void *closure)

Callback for cleaning up resources.

This function is called to release resources associated with a specific operation.

Parameters
closureA user-defined pointer to the resource or context to be freed.

Definition at line 121 of file novasvg.h.

◆ novasvg_write_func_t

typedef void(* novasvg_write_func_t) (void *closure, void *data, int size)

A function pointer type for a write callback.

Parameters
closureA pointer to user-defined data or context.
dataA pointer to the data to be written.
sizeThe size of the data in bytes.

Definition at line 129 of file novasvg.h.