libxputty 0.1
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions | Variables
nanosvg.h File Reference

NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. More...

Go to the source code of this file.

Data Structures

struct  NSVGgradientStop
 
struct  NSVGgradient
 
struct  NSVGpaint
 
struct  NSVGpath
 
struct  NSVGshape
 
struct  NSVGimage
 
struct  NSVGcoordinate
 
struct  NSVGlinearData
 
struct  NSVGradialData
 
struct  NSVGgradientData
 
struct  NSVGattrib
 
struct  NSVGparser
 
struct  NSVGNamedColor
 

Typedefs

typedef struct NSVGgradientStop NSVGgradientStop
 
typedef struct NSVGgradient NSVGgradient
 
typedef struct NSVGpaint NSVGpaint
 
typedef struct NSVGpath NSVGpath
 
typedef struct NSVGshape NSVGshape
 
typedef struct NSVGimage NSVGimage
 
typedef struct NSVGcoordinate NSVGcoordinate
 
typedef struct NSVGlinearData NSVGlinearData
 
typedef struct NSVGradialData NSVGradialData
 
typedef struct NSVGgradientData NSVGgradientData
 
typedef struct NSVGattrib NSVGattrib
 
typedef struct NSVGparser NSVGparser
 
typedef struct NSVGNamedColor NSVGNamedColor
 

Enumerations

enum  NSVGpaintType { NSVG_PAINT_NONE = 0 , NSVG_PAINT_COLOR = 1 , NSVG_PAINT_LINEAR_GRADIENT = 2 , NSVG_PAINT_RADIAL_GRADIENT = 3 }
 
enum  NSVGspreadType { NSVG_SPREAD_PAD = 0 , NSVG_SPREAD_REFLECT = 1 , NSVG_SPREAD_REPEAT = 2 }
 
enum  NSVGlineJoin { NSVG_JOIN_MITER = 0 , NSVG_JOIN_ROUND = 1 , NSVG_JOIN_BEVEL = 2 }
 
enum  NSVGlineCap { NSVG_CAP_BUTT = 0 , NSVG_CAP_ROUND = 1 , NSVG_CAP_SQUARE = 2 }
 
enum  NSVGfillRule { NSVG_FILLRULE_NONZERO = 0 , NSVG_FILLRULE_EVENODD = 1 }
 
enum  NSVGflags { NSVG_FLAGS_VISIBLE = 0x01 }
 
enum  NSVGgradientUnits { NSVG_USER_SPACE = 0 , NSVG_OBJECT_SPACE = 1 }
 
enum  NSVGunits {
  NSVG_UNITS_USER , NSVG_UNITS_PX , NSVG_UNITS_PT , NSVG_UNITS_PC ,
  NSVG_UNITS_MM , NSVG_UNITS_CM , NSVG_UNITS_IN , NSVG_UNITS_PERCENT ,
  NSVG_UNITS_EM , NSVG_UNITS_EX
}
 

Functions

NSVGimagensvgParseFromFile (const char *filename, const char *units, float dpi)
 
NSVGimagensvgParse (char *input, const char *units, float dpi)
 
NSVGpathnsvgDuplicatePath (NSVGpath *p)
 
void nsvgDelete (NSVGimage *image)
 
int nsvg__parseXML (char *input, void(*startelCb)(void *ud, const char *el, const char **attr), void(*endelCb)(void *ud, const char *el), void(*contentCb)(void *ud, const char *s), void *ud)
 

Variables

NSVGNamedColor nsvg__colors []
 

Detailed Description

NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.

The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.

NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!

The shapes in the SVG images are transformed by the viewBox and converted to specified units. That is, you should get the same looking data as your designed in your favorite app.

NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.

The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. DPI (dots-per-inch) controls how the unit conversion is done.

If you don't know or care about the units stuff, "px" and 96 should get you going.

Definition in file nanosvg.h.

Typedef Documentation

◆ NSVGattrib

typedef struct NSVGattrib NSVGattrib

◆ NSVGcoordinate

◆ NSVGgradient

typedef struct NSVGgradient NSVGgradient

◆ NSVGgradientData

◆ NSVGgradientStop

◆ NSVGimage

typedef struct NSVGimage NSVGimage

◆ NSVGlinearData

◆ NSVGNamedColor

◆ NSVGpaint

typedef struct NSVGpaint NSVGpaint

◆ NSVGparser

typedef struct NSVGparser NSVGparser

◆ NSVGpath

typedef struct NSVGpath NSVGpath

◆ NSVGradialData

◆ NSVGshape

typedef struct NSVGshape NSVGshape

Enumeration Type Documentation

◆ NSVGfillRule

Enumerator
NSVG_FILLRULE_NONZERO 
NSVG_FILLRULE_EVENODD 

Definition at line 100 of file nanosvg.h.

100 {
103};
@ NSVG_FILLRULE_NONZERO
Definition nanosvg.h:101
@ NSVG_FILLRULE_EVENODD
Definition nanosvg.h:102

◆ NSVGflags

enum NSVGflags
Enumerator
NSVG_FLAGS_VISIBLE 

Definition at line 105 of file nanosvg.h.

105 {
106 NSVG_FLAGS_VISIBLE = 0x01
107};
@ NSVG_FLAGS_VISIBLE
Definition nanosvg.h:106

◆ NSVGgradientUnits

Enumerator
NSVG_USER_SPACE 
NSVG_OBJECT_SPACE 

Definition at line 362 of file nanosvg.h.

362 {
363 NSVG_USER_SPACE = 0,
365};
@ NSVG_OBJECT_SPACE
Definition nanosvg.h:364
@ NSVG_USER_SPACE
Definition nanosvg.h:363

◆ NSVGlineCap

Enumerator
NSVG_CAP_BUTT 
NSVG_CAP_ROUND 
NSVG_CAP_SQUARE 

Definition at line 94 of file nanosvg.h.

94 {
95 NSVG_CAP_BUTT = 0,
98};
@ NSVG_CAP_SQUARE
Definition nanosvg.h:97
@ NSVG_CAP_BUTT
Definition nanosvg.h:95
@ NSVG_CAP_ROUND
Definition nanosvg.h:96

◆ NSVGlineJoin

Enumerator
NSVG_JOIN_MITER 
NSVG_JOIN_ROUND 
NSVG_JOIN_BEVEL 

Definition at line 88 of file nanosvg.h.

88 {
92};
@ NSVG_JOIN_BEVEL
Definition nanosvg.h:91
@ NSVG_JOIN_ROUND
Definition nanosvg.h:90
@ NSVG_JOIN_MITER
Definition nanosvg.h:89

◆ NSVGpaintType

Enumerator
NSVG_PAINT_NONE 
NSVG_PAINT_COLOR 
NSVG_PAINT_LINEAR_GRADIENT 
NSVG_PAINT_RADIAL_GRADIENT 

Definition at line 75 of file nanosvg.h.

75 {
80};
@ NSVG_PAINT_NONE
Definition nanosvg.h:76
@ NSVG_PAINT_COLOR
Definition nanosvg.h:77
@ NSVG_PAINT_RADIAL_GRADIENT
Definition nanosvg.h:79
@ NSVG_PAINT_LINEAR_GRADIENT
Definition nanosvg.h:78

◆ NSVGspreadType

Enumerator
NSVG_SPREAD_PAD 
NSVG_SPREAD_REFLECT 
NSVG_SPREAD_REPEAT 

Definition at line 82 of file nanosvg.h.

82 {
86};
@ NSVG_SPREAD_REPEAT
Definition nanosvg.h:85
@ NSVG_SPREAD_PAD
Definition nanosvg.h:83
@ NSVG_SPREAD_REFLECT
Definition nanosvg.h:84

◆ NSVGunits

enum NSVGunits
Enumerator
NSVG_UNITS_USER 
NSVG_UNITS_PX 
NSVG_UNITS_PT 
NSVG_UNITS_PC 
NSVG_UNITS_MM 
NSVG_UNITS_CM 
NSVG_UNITS_IN 
NSVG_UNITS_PERCENT 
NSVG_UNITS_EM 
NSVG_UNITS_EX 

Definition at line 369 of file nanosvg.h.

369 {
380};
@ NSVG_UNITS_USER
Definition nanosvg.h:370
@ NSVG_UNITS_PC
Definition nanosvg.h:373
@ NSVG_UNITS_CM
Definition nanosvg.h:375
@ NSVG_UNITS_EX
Definition nanosvg.h:379
@ NSVG_UNITS_MM
Definition nanosvg.h:374
@ NSVG_UNITS_EM
Definition nanosvg.h:378
@ NSVG_UNITS_PERCENT
Definition nanosvg.h:377
@ NSVG_UNITS_PX
Definition nanosvg.h:371
@ NSVG_UNITS_PT
Definition nanosvg.h:372
@ NSVG_UNITS_IN
Definition nanosvg.h:376

Function Documentation

◆ nsvg__parseXML()

int nsvg__parseXML ( char *  input,
void(*)(void *ud, const char *el, const char **attr)  startelCb,
void(*)(void *ud, const char *el)  endelCb,
void(*)(void *ud, const char *s)  contentCb,
void *  ud 
)

Definition at line 327 of file nanosvg.h.

332{
333 char* s = input;
334 char* mark = s;
335 int state = NSVG_XML_CONTENT;
336 while (*s) {
337 if (*s == '<' && state == NSVG_XML_CONTENT) {
338 // Start of a tag
339 *s++ = '\0';
340 nsvg__parseContent(mark, contentCb, ud);
341 mark = s;
342 state = NSVG_XML_TAG;
343 } else if (*s == '>' && state == NSVG_XML_TAG) {
344 // Start of a content or new tag.
345 *s++ = '\0';
346 nsvg__parseElement(mark, startelCb, endelCb, ud);
347 mark = s;
348 state = NSVG_XML_CONTENT;
349 } else {
350 s++;
351 }
352 }
353
354 return 1;
355}

Referenced by nsvgParse().

◆ nsvgDelete()

void nsvgDelete ( NSVGimage image)

Definition at line 2993 of file nanosvg.h.

2994{
2995 NSVGshape *snext, *shape;
2996 if (image == NULL) return;
2997 shape = image->shapes;
2998 while (shape != NULL) {
2999 snext = shape->next;
3000 nsvg__deletePaths(shape->paths);
3001 nsvg__deletePaint(&shape->fill);
3002 nsvg__deletePaint(&shape->stroke);
3003 free(shape);
3004 shape = snext;
3005 }
3006 free(image);
3007}
NSVGshape * shapes
Definition nanosvg.h:163
struct NSVGshape * next
Definition nanosvg.h:156
NSVGpath * paths
Definition nanosvg.h:155
NSVGpaint stroke
Definition nanosvg.h:143
NSVGpaint fill
Definition nanosvg.h:142

References NSVGshape::fill, NSVGshape::next, NSVGshape::paths, NSVGimage::shapes, and NSVGshape::stroke.

Referenced by cairo_image_surface_create_from_svg(), nsvgParseFromFile(), widget_get_scaled_svg(), widget_get_scaled_svg_from_file(), widget_get_svg(), and widget_get_svg_from_file().

◆ nsvgDuplicatePath()

NSVGpath * nsvgDuplicatePath ( NSVGpath p)

Definition at line 2963 of file nanosvg.h.

2964{
2965 NSVGpath* res = NULL;
2966
2967 if (p == NULL)
2968 return NULL;
2969
2970 res = (NSVGpath*)malloc(sizeof(NSVGpath));
2971 if (res == NULL) goto error;
2972 memset(res, 0, sizeof(NSVGpath));
2973
2974 res->pts = (float*)malloc(p->npts*2*sizeof(float));
2975 if (res->pts == NULL) goto error;
2976 memcpy(res->pts, p->pts, p->npts * sizeof(float) * 2);
2977 res->npts = p->npts;
2978
2979 memcpy(res->bounds, p->bounds, sizeof(p->bounds));
2980
2981 res->closed = p->closed;
2982
2983 return res;
2984
2985error:
2986 if (res != NULL) {
2987 free(res->pts);
2988 free(res);
2989 }
2990 return NULL;
2991}
int npts
Definition nanosvg.h:133
float bounds[4]
Definition nanosvg.h:135
char closed
Definition nanosvg.h:134
float * pts
Definition nanosvg.h:132

References NSVGpath::bounds, NSVGpath::closed, NSVGpath::npts, and NSVGpath::pts.

◆ nsvgParse()

NSVGimage * nsvgParse ( char *  input,
const char *  units,
float  dpi 
)

Definition at line 2910 of file nanosvg.h.

2911{
2912 NSVGparser* p;
2913 NSVGimage* ret = 0;
2914
2915 p = nsvg__createParser();
2916 if (p == NULL) {
2917 return NULL;
2918 }
2919 p->dpi = dpi;
2920
2921 nsvg__parseXML(input, nsvg__startElement, nsvg__endElement, nsvg__content, p);
2922
2923 // Scale to viewBox
2924 nsvg__scaleToViewbox(p, units);
2925
2926 ret = p->image;
2927 p->image = NULL;
2928
2929 nsvg__deleteParser(p);
2930
2931 return ret;
2932}
int nsvg__parseXML(char *input, void(*startelCb)(void *ud, const char *el, const char **attr), void(*endelCb)(void *ud, const char *el), void(*contentCb)(void *ud, const char *s), void *ud)
Definition nanosvg.h:327
NSVGimage * image
Definition nanosvg.h:448
float dpi
Definition nanosvg.h:453

References NSVGparser::dpi, NSVGparser::image, and nsvg__parseXML().

Referenced by nsvgParseFromFile(), widget_get_scaled_svg(), and widget_get_svg().

◆ nsvgParseFromFile()

NSVGimage * nsvgParseFromFile ( const char *  filename,
const char *  units,
float  dpi 
)

Definition at line 2934 of file nanosvg.h.

2935{
2936 FILE* fp = NULL;
2937 size_t size;
2938 char* data = NULL;
2939 NSVGimage* image = NULL;
2940
2941 fp = fopen(filename, "rb");
2942 if (!fp) goto error;
2943 fseek(fp, 0, SEEK_END);
2944 size = ftell(fp);
2945 fseek(fp, 0, SEEK_SET);
2946 data = (char*)malloc(size+1);
2947 if (data == NULL) goto error;
2948 if (fread(data, 1, size, fp) != size) goto error;
2949 data[size] = '\0'; // Must be null terminated.
2950 fclose(fp);
2951 image = nsvgParse(data, units, dpi);
2952 free(data);
2953
2954 return image;
2955
2956error:
2957 if (fp) fclose(fp);
2958 if (data) free(data);
2959 if (image) nsvgDelete(image);
2960 return NULL;
2961}
NSVGimage * nsvgParse(char *input, const char *units, float dpi)
Definition nanosvg.h:2910
void nsvgDelete(NSVGimage *image)
Definition nanosvg.h:2993

References nsvgDelete(), and nsvgParse().

Referenced by cairo_image_surface_create_from_svg(), widget_get_scaled_svg_from_file(), and widget_get_svg_from_file().

Variable Documentation

◆ nsvg__colors

NSVGNamedColor nsvg__colors[]

Definition at line 1242 of file nanosvg.h.

1242 {
1243
1244 { "red", NSVG_RGB(255, 0, 0) },
1245 { "green", NSVG_RGB( 0, 128, 0) },
1246 { "blue", NSVG_RGB( 0, 0, 255) },
1247 { "yellow", NSVG_RGB(255, 255, 0) },
1248 { "cyan", NSVG_RGB( 0, 255, 255) },
1249 { "magenta", NSVG_RGB(255, 0, 255) },
1250 { "black", NSVG_RGB( 0, 0, 0) },
1251 { "grey", NSVG_RGB(128, 128, 128) },
1252 { "gray", NSVG_RGB(128, 128, 128) },
1253 { "white", NSVG_RGB(255, 255, 255) },
1254
1255#ifdef NANOSVG_ALL_COLOR_KEYWORDS
1256 { "aliceblue", NSVG_RGB(240, 248, 255) },
1257 { "antiquewhite", NSVG_RGB(250, 235, 215) },
1258 { "aqua", NSVG_RGB( 0, 255, 255) },
1259 { "aquamarine", NSVG_RGB(127, 255, 212) },
1260 { "azure", NSVG_RGB(240, 255, 255) },
1261 { "beige", NSVG_RGB(245, 245, 220) },
1262 { "bisque", NSVG_RGB(255, 228, 196) },
1263 { "blanchedalmond", NSVG_RGB(255, 235, 205) },
1264 { "blueviolet", NSVG_RGB(138, 43, 226) },
1265 { "brown", NSVG_RGB(165, 42, 42) },
1266 { "burlywood", NSVG_RGB(222, 184, 135) },
1267 { "cadetblue", NSVG_RGB( 95, 158, 160) },
1268 { "chartreuse", NSVG_RGB(127, 255, 0) },
1269 { "chocolate", NSVG_RGB(210, 105, 30) },
1270 { "coral", NSVG_RGB(255, 127, 80) },
1271 { "cornflowerblue", NSVG_RGB(100, 149, 237) },
1272 { "cornsilk", NSVG_RGB(255, 248, 220) },
1273 { "crimson", NSVG_RGB(220, 20, 60) },
1274 { "darkblue", NSVG_RGB( 0, 0, 139) },
1275 { "darkcyan", NSVG_RGB( 0, 139, 139) },
1276 { "darkgoldenrod", NSVG_RGB(184, 134, 11) },
1277 { "darkgray", NSVG_RGB(169, 169, 169) },
1278 { "darkgreen", NSVG_RGB( 0, 100, 0) },
1279 { "darkgrey", NSVG_RGB(169, 169, 169) },
1280 { "darkkhaki", NSVG_RGB(189, 183, 107) },
1281 { "darkmagenta", NSVG_RGB(139, 0, 139) },
1282 { "darkolivegreen", NSVG_RGB( 85, 107, 47) },
1283 { "darkorange", NSVG_RGB(255, 140, 0) },
1284 { "darkorchid", NSVG_RGB(153, 50, 204) },
1285 { "darkred", NSVG_RGB(139, 0, 0) },
1286 { "darksalmon", NSVG_RGB(233, 150, 122) },
1287 { "darkseagreen", NSVG_RGB(143, 188, 143) },
1288 { "darkslateblue", NSVG_RGB( 72, 61, 139) },
1289 { "darkslategray", NSVG_RGB( 47, 79, 79) },
1290 { "darkslategrey", NSVG_RGB( 47, 79, 79) },
1291 { "darkturquoise", NSVG_RGB( 0, 206, 209) },
1292 { "darkviolet", NSVG_RGB(148, 0, 211) },
1293 { "deeppink", NSVG_RGB(255, 20, 147) },
1294 { "deepskyblue", NSVG_RGB( 0, 191, 255) },
1295 { "dimgray", NSVG_RGB(105, 105, 105) },
1296 { "dimgrey", NSVG_RGB(105, 105, 105) },
1297 { "dodgerblue", NSVG_RGB( 30, 144, 255) },
1298 { "firebrick", NSVG_RGB(178, 34, 34) },
1299 { "floralwhite", NSVG_RGB(255, 250, 240) },
1300 { "forestgreen", NSVG_RGB( 34, 139, 34) },
1301 { "fuchsia", NSVG_RGB(255, 0, 255) },
1302 { "gainsboro", NSVG_RGB(220, 220, 220) },
1303 { "ghostwhite", NSVG_RGB(248, 248, 255) },
1304 { "gold", NSVG_RGB(255, 215, 0) },
1305 { "goldenrod", NSVG_RGB(218, 165, 32) },
1306 { "greenyellow", NSVG_RGB(173, 255, 47) },
1307 { "honeydew", NSVG_RGB(240, 255, 240) },
1308 { "hotpink", NSVG_RGB(255, 105, 180) },
1309 { "indianred", NSVG_RGB(205, 92, 92) },
1310 { "indigo", NSVG_RGB( 75, 0, 130) },
1311 { "ivory", NSVG_RGB(255, 255, 240) },
1312 { "khaki", NSVG_RGB(240, 230, 140) },
1313 { "lavender", NSVG_RGB(230, 230, 250) },
1314 { "lavenderblush", NSVG_RGB(255, 240, 245) },
1315 { "lawngreen", NSVG_RGB(124, 252, 0) },
1316 { "lemonchiffon", NSVG_RGB(255, 250, 205) },
1317 { "lightblue", NSVG_RGB(173, 216, 230) },
1318 { "lightcoral", NSVG_RGB(240, 128, 128) },
1319 { "lightcyan", NSVG_RGB(224, 255, 255) },
1320 { "lightgoldenrodyellow", NSVG_RGB(250, 250, 210) },
1321 { "lightgray", NSVG_RGB(211, 211, 211) },
1322 { "lightgreen", NSVG_RGB(144, 238, 144) },
1323 { "lightgrey", NSVG_RGB(211, 211, 211) },
1324 { "lightpink", NSVG_RGB(255, 182, 193) },
1325 { "lightsalmon", NSVG_RGB(255, 160, 122) },
1326 { "lightseagreen", NSVG_RGB( 32, 178, 170) },
1327 { "lightskyblue", NSVG_RGB(135, 206, 250) },
1328 { "lightslategray", NSVG_RGB(119, 136, 153) },
1329 { "lightslategrey", NSVG_RGB(119, 136, 153) },
1330 { "lightsteelblue", NSVG_RGB(176, 196, 222) },
1331 { "lightyellow", NSVG_RGB(255, 255, 224) },
1332 { "lime", NSVG_RGB( 0, 255, 0) },
1333 { "limegreen", NSVG_RGB( 50, 205, 50) },
1334 { "linen", NSVG_RGB(250, 240, 230) },
1335 { "maroon", NSVG_RGB(128, 0, 0) },
1336 { "mediumaquamarine", NSVG_RGB(102, 205, 170) },
1337 { "mediumblue", NSVG_RGB( 0, 0, 205) },
1338 { "mediumorchid", NSVG_RGB(186, 85, 211) },
1339 { "mediumpurple", NSVG_RGB(147, 112, 219) },
1340 { "mediumseagreen", NSVG_RGB( 60, 179, 113) },
1341 { "mediumslateblue", NSVG_RGB(123, 104, 238) },
1342 { "mediumspringgreen", NSVG_RGB( 0, 250, 154) },
1343 { "mediumturquoise", NSVG_RGB( 72, 209, 204) },
1344 { "mediumvioletred", NSVG_RGB(199, 21, 133) },
1345 { "midnightblue", NSVG_RGB( 25, 25, 112) },
1346 { "mintcream", NSVG_RGB(245, 255, 250) },
1347 { "mistyrose", NSVG_RGB(255, 228, 225) },
1348 { "moccasin", NSVG_RGB(255, 228, 181) },
1349 { "navajowhite", NSVG_RGB(255, 222, 173) },
1350 { "navy", NSVG_RGB( 0, 0, 128) },
1351 { "oldlace", NSVG_RGB(253, 245, 230) },
1352 { "olive", NSVG_RGB(128, 128, 0) },
1353 { "olivedrab", NSVG_RGB(107, 142, 35) },
1354 { "orange", NSVG_RGB(255, 165, 0) },
1355 { "orangered", NSVG_RGB(255, 69, 0) },
1356 { "orchid", NSVG_RGB(218, 112, 214) },
1357 { "palegoldenrod", NSVG_RGB(238, 232, 170) },
1358 { "palegreen", NSVG_RGB(152, 251, 152) },
1359 { "paleturquoise", NSVG_RGB(175, 238, 238) },
1360 { "palevioletred", NSVG_RGB(219, 112, 147) },
1361 { "papayawhip", NSVG_RGB(255, 239, 213) },
1362 { "peachpuff", NSVG_RGB(255, 218, 185) },
1363 { "peru", NSVG_RGB(205, 133, 63) },
1364 { "pink", NSVG_RGB(255, 192, 203) },
1365 { "plum", NSVG_RGB(221, 160, 221) },
1366 { "powderblue", NSVG_RGB(176, 224, 230) },
1367 { "purple", NSVG_RGB(128, 0, 128) },
1368 { "rosybrown", NSVG_RGB(188, 143, 143) },
1369 { "royalblue", NSVG_RGB( 65, 105, 225) },
1370 { "saddlebrown", NSVG_RGB(139, 69, 19) },
1371 { "salmon", NSVG_RGB(250, 128, 114) },
1372 { "sandybrown", NSVG_RGB(244, 164, 96) },
1373 { "seagreen", NSVG_RGB( 46, 139, 87) },
1374 { "seashell", NSVG_RGB(255, 245, 238) },
1375 { "sienna", NSVG_RGB(160, 82, 45) },
1376 { "silver", NSVG_RGB(192, 192, 192) },
1377 { "skyblue", NSVG_RGB(135, 206, 235) },
1378 { "slateblue", NSVG_RGB(106, 90, 205) },
1379 { "slategray", NSVG_RGB(112, 128, 144) },
1380 { "slategrey", NSVG_RGB(112, 128, 144) },
1381 { "snow", NSVG_RGB(255, 250, 250) },
1382 { "springgreen", NSVG_RGB( 0, 255, 127) },
1383 { "steelblue", NSVG_RGB( 70, 130, 180) },
1384 { "tan", NSVG_RGB(210, 180, 140) },
1385 { "teal", NSVG_RGB( 0, 128, 128) },
1386 { "thistle", NSVG_RGB(216, 191, 216) },
1387 { "tomato", NSVG_RGB(255, 99, 71) },
1388 { "turquoise", NSVG_RGB( 64, 224, 208) },
1389 { "violet", NSVG_RGB(238, 130, 238) },
1390 { "wheat", NSVG_RGB(245, 222, 179) },
1391 { "whitesmoke", NSVG_RGB(245, 245, 245) },
1392 { "yellowgreen", NSVG_RGB(154, 205, 50) },
1393#endif
1394};