]>
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
16 #define svgtiny_RGB(r, g, b) ((b) << 16 | (g) << 8 | (r))
18 #define svgtiny_RGB(r, g, b) ((r) << 16 | (g) << 8 | (b))
21 struct svgtiny_shape
{
23 unsigned int path_length
;
27 svgtiny_colour stroke
;
31 struct svgtiny_diagram
{
34 struct svgtiny_shape
*shape
;
35 unsigned int shape_count
;
40 svgtiny_OUT_OF_MEMORY
,
52 struct svgtiny_named_color
{
58 struct svgtiny_diagram
*svgtiny_create(void);
59 svgtiny_code
svgtiny_parse(struct svgtiny_diagram
*diagram
,
60 const char *buffer
, size_t size
, const char *url
,
61 int width
, int height
);
62 void svgtiny_free(struct svgtiny_diagram
*svg
);
64 const struct svgtiny_named_color
*
65 svgtiny_color_lookup (register const char *str
, register unsigned int len
);