#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <algorithm>
Go to the source code of this file.
|
| NOVASVG_INLINE uint32_t | novasvg::render::premultiply_argb (uint32_t color) |
| |
| NOVASVG_INLINE bool | novasvg::render::parse_number (const char **begin, const char *end, float *number) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_delim (const char **begin, const char *end, const char delim) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_string (const char **begin, const char *end, const char *data) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_ws (const char **begin, const char *end) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_ws_and_delim (const char **begin, const char *end, char delim) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_ws_and_comma (const char **begin, const char *end) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_ws_or_delim (const char **begin, const char *end, char delim, bool *has_delim) |
| |
| NOVASVG_INLINE bool | novasvg::render::skip_ws_or_comma (const char **begin, const char *end, bool *has_comma) |
| |
| NOVASVG_INLINE void | novasvg::render::skip_css_unit (const char **begin, const char *end, float *number) |
| |
◆ novasvg_alpha
| #define novasvg_alpha |
( |
|
c | ) |
(((c) >> 24) & 0xff) |
◆ novasvg_array_append
◆ novasvg_array_append_data
| #define novasvg_array_append_data |
( |
|
array, |
|
|
|
newdata, |
|
|
|
count |
|
) |
| |
Value: do { \
if(newdata && count > 0) { \
novasvg_array_ensure(array, count); \
memcpy((array).data + (array).size, newdata, (count) * sizeof((newdata)[0])); \
(array).size += count; \
} \
} while(0)
Definition at line 60 of file utils.h.
◆ NOVASVG_ARRAY_CAST
| #define NOVASVG_ARRAY_CAST |
( |
|
array, |
|
|
|
value |
|
) |
| (value) |
◆ novasvg_array_clear
| #define novasvg_array_clear |
( |
|
array | ) |
((array).size = 0) |
◆ novasvg_array_destroy
| #define novasvg_array_destroy |
( |
|
array | ) |
free((array).data) |
◆ novasvg_array_ensure
| #define novasvg_array_ensure |
( |
|
array, |
|
|
|
count |
|
) |
| |
Value: do { \
if((array).size + (count) > (array).capacity) { \
int capacity = (array).size + (count); \
int newcapacity = (array).capacity == 0 ? 8 : (array).capacity; \
while(newcapacity < capacity) { newcapacity *= 2; } \
(array).data =
NOVASVG_ARRAY_CAST(array, realloc((array).data, newcapacity *
sizeof((array).data[0]))); \
(array).capacity = newcapacity; \
} \
} while(0)
#define NOVASVG_ARRAY_CAST(array, value)
Definition at line 49 of file utils.h.
◆ novasvg_array_init
| #define novasvg_array_init |
( |
|
array | ) |
|
Value: do { \
(array).data = NULL; \
(array).size = 0; \
(array).capacity = 0; \
} while(0)
Definition at line 36 of file utils.h.
◆ novasvg_blue
| #define novasvg_blue |
( |
|
c | ) |
(((c) >> 0) & 0xff) |
◆ novasvg_green
| #define novasvg_green |
( |
|
c | ) |
(((c) >> 8) & 0xff) |
◆ NOVASVG_IS_ALNUM
◆ NOVASVG_IS_ALPHA
| #define NOVASVG_IS_ALPHA |
( |
|
c | ) |
(((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) |
◆ NOVASVG_IS_NUM
| #define NOVASVG_IS_NUM |
( |
|
c | ) |
((c) >= '0' && (c) <= '9') |
◆ NOVASVG_IS_WS
| #define NOVASVG_IS_WS |
( |
|
c | ) |
((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r') |
◆ novasvg_red
| #define novasvg_red |
( |
|
c | ) |
(((c) >> 16) & 0xff) |
◆ NOVASVG_UTILS_H