X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxtools.h;h=430b2e40459e826ac29f0d625ccc0e6710be002a;hb=6c8f037f0f76ce4b28b80a2133e4150d93012ef7;hp=163138b4265aef43f8f941e5c07c5663962cfc3f;hpb=ecd7c7248b9a93163090bfe7512b2a53d8da6d95;p=swftools.git diff --git a/lib/gfxtools.h b/lib/gfxtools.h index 163138b..430b2e4 100644 --- a/lib/gfxtools.h +++ b/lib/gfxtools.h @@ -50,6 +50,7 @@ typedef struct _gfxpoint typedef struct _gfxfontlist { gfxfont_t*font; + void*user; struct _gfxfontlist*next; } gfxfontlist_t; @@ -73,6 +74,11 @@ void gfxbbox_intersect(gfxbbox_t*box1, gfxbbox_t*box2); void gfxline_transform(gfxline_t*line, gfxmatrix_t*matrix); +/* tries to remove unnecessary moveTos from the gfxline */ +gfxline_t* gfxline_restitch(gfxline_t*line); +/* reverses in place */ +gfxline_t* gfxline_reverse(gfxline_t*line); + void gfxmatrix_dump(gfxmatrix_t*l, FILE*fi, char*prefix); void gfxmatrix_transform(gfxmatrix_t*m, gfxcoord_t* v1, gfxcoord_t*dest); void gfxmatrix_invert(gfxmatrix_t*src, gfxmatrix_t*dest); @@ -81,8 +87,10 @@ void gfxmatrix_multiply(gfxmatrix_t*m1, gfxmatrix_t*m2, gfxmatrix_t*dest); gfxfontlist_t* gfxfontlist_create(); gfxfontlist_t*gfxfontlist_addfont(gfxfontlist_t*list, gfxfont_t*font); +gfxfontlist_t*gfxfontlist_addfont2(gfxfontlist_t*list, gfxfont_t*font, void*user); gfxfont_t*gfxfontlist_findfont(gfxfontlist_t*list, char*id); char gfxfontlist_hasfont(gfxfontlist_t*list, gfxfont_t*font); +void* gfxfontlist_getuserdata(gfxfontlist_t*list, const char*id); void gfxfontlist_free(gfxfontlist_t*list, char deletefonts); void gfximage_save_jpeg(gfximage_t*img, char*filename, int quality); @@ -93,6 +101,19 @@ gfxline_t*gfxline_makerectangle(double x1, double y1, double x2, double y2); gfxline_t*gfxline_makecircle(double x,double y,double rx, double ry); void gfxline_show(gfxline_t*line, FILE*fi); +typedef struct _gfxparam { + const char*key; + const char*value; + struct _gfxparam* next; +} gfxparam_t; +typedef struct _gfxparams { + gfxparam_t*params; + gfxparam_t*last; +} gfxparams_t; +gfxparams_t* gfxparams_new(); +void gfxparams_store(gfxparams_t*params, const char*name, const char*value); +void gfxparams_free(gfxparams_t*params); + #ifdef __cplusplus } #endif