X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=svgtiny.h;h=133086c372ed50c9a2359ed1977be63cb7cc3715;hb=280ad258f4d5e5688bd64d98c1ed8ebab903d178;hp=a5017d1ff6a1d09882eea954bb6d8429600a4b5b;hpb=476717e96cd6012ad725474b45aadaf8bf11d2ba;p=libsvgtiny.git diff --git a/svgtiny.h b/svgtiny.h index a5017d1..133086c 100644 --- a/svgtiny.h +++ b/svgtiny.h @@ -12,7 +12,17 @@ typedef int svgtiny_colour; #define svgtiny_TRANSPARENT 0x1000000 +#ifdef riscos +#define svgtiny_RGB(r, g, b) ((b) << 16 | (g) << 8 | (r)) +#define svgtiny_RED(c) ((c) & 0xff) +#define svgtiny_GREEN(c) (((c) >> 8) & 0xff) +#define svgtiny_BLUE(c) (((c) >> 16) & 0xff) +#else #define svgtiny_RGB(r, g, b) ((r) << 16 | (g) << 8 | (b)) +#define svgtiny_RED(c) (((c) >> 16) & 0xff) +#define svgtiny_GREEN(c) (((c) >> 8) & 0xff) +#define svgtiny_BLUE(c) ((c) & 0xff) +#endif struct svgtiny_shape { float *path; @@ -25,13 +35,13 @@ struct svgtiny_shape { }; struct svgtiny_diagram { - xmlDoc *doc; - xmlNode *svg; - int width, height; struct svgtiny_shape *shape; unsigned int shape_count; + + unsigned short error_line; + const char *error_message; }; typedef enum { @@ -39,6 +49,7 @@ typedef enum { svgtiny_OUT_OF_MEMORY, svgtiny_LIBXML_ERROR, svgtiny_NOT_SVG, + svgtiny_SVG_ERROR, } svgtiny_code; enum { @@ -60,7 +71,4 @@ svgtiny_code svgtiny_parse(struct svgtiny_diagram *diagram, int width, int height); void svgtiny_free(struct svgtiny_diagram *svg); -const struct svgtiny_named_color * -svgtiny_color_lookup (register const char *str, register unsigned int len); - #endif