X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fgfxtools.h;h=ff282a3938a3c95ccc482be29452323cf834dc01;hb=0e9d27093c3e6e8e316fbc08bb9d422d74da2fd1;hp=8d6d397e0d46cd8678216dedcb6aa3095325f6ea;hpb=6ac96fe8d278883885cf1b885eade140ab76afe3;p=swftools.git diff --git a/lib/gfxtools.h b/lib/gfxtools.h index 8d6d397..ff282a3 100644 --- a/lib/gfxtools.h +++ b/lib/gfxtools.h @@ -38,6 +38,7 @@ typedef struct _gfxdrawer void (*moveTo)(struct _gfxdrawer*d, gfxcoord_t x, gfxcoord_t y); void (*lineTo)(struct _gfxdrawer*d, gfxcoord_t x, gfxcoord_t y); void (*splineTo)(struct _gfxdrawer*d, gfxcoord_t sx, gfxcoord_t sy, gfxcoord_t x, gfxcoord_t y); + void (*close)(struct _gfxdrawer*d); void* (*result)(struct _gfxdrawer*d); } gfxdrawer_t; @@ -49,6 +50,7 @@ typedef struct _gfxpoint typedef struct _gfxfontlist { gfxfont_t*font; + void*user; struct _gfxfontlist*next; } gfxfontlist_t; @@ -80,11 +82,18 @@ 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); -gfxline_t*gfxline_makerectangle(int x1, int y1, int x2, int y2); +void gfximage_save_jpeg(gfximage_t*img, char*filename, int quality); + +gfxbbox_t* gfxline_isrectangle(gfxline_t*_l); + +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); #ifdef __cplusplus