]>
gitweb.michael.orlitzky.com - libsvgtiny.git/blob - svgtiny.h
2 * This file is part of Libsvgtiny
3 * Licensed under the MIT License,
4 * http://opensource.org/licenses/mit-license.php
5 * Copyright 2008 James Bursa <james@semichrome.net>
11 #include <libxml/parser.h>
13 typedef int svgtiny_colour
;
14 #define svgtiny_TRANSPARENT 0x1000000
15 #define svgtiny_RGB(r, g, b) ((r) << 16 | (g) << 8 | (b))
17 struct svgtiny_shape
{
19 unsigned int path_length
;
23 svgtiny_colour stroke
;
27 struct svgtiny_diagram
{
30 struct svgtiny_shape
*shape
;
31 unsigned int shape_count
;
36 svgtiny_OUT_OF_MEMORY
,
48 struct svgtiny_named_color
{
54 struct svgtiny_diagram
*svgtiny_create(void);
55 svgtiny_code
svgtiny_parse(struct svgtiny_diagram
*diagram
,
56 const char *buffer
, size_t size
, const char *url
,
57 int width
, int height
);
58 void svgtiny_free(struct svgtiny_diagram
*svg
);
60 const struct svgtiny_named_color
*
61 svgtiny_color_lookup (register const char *str
, register unsigned int len
);