#ifndef _IMAGE_H_
#define _IMAGE_H_
-#include "io.h"
+#include "imio.h"
#include "iolayer.h"
#include "log.h"
#include "stackmach.h"
void i_box (i_img *im,int x1,int y1,int x2,int y2,i_color *val);
void i_box_filled (i_img *im,int x1,int y1,int x2,int y2,i_color *val);
void i_box_cfill(i_img *im, int x1, int y1, int x2, int y2, i_fill_t *fill);
-void i_draw (i_img *im,int x1,int y1,int x2,int y2,i_color *val);
-void i_line_aa (i_img *im,int x1,int y1,int x2,int y2,i_color *val);
+void i_line (i_img *im,int x1,int y1,int x2,int y2,i_color *val, int endp);
+void i_line_aa (i_img *im,int x1,int y1,int x2,int y2,i_color *val, int endp);
void i_arc (i_img *im,int x,int y,float rad,float d1,float d2,i_color *val);
void i_arc_cfill(i_img *im,int x,int y,float rad,float d1,float d2,i_fill_t *fill);
void i_circle_aa (i_img *im,float x, float y,float rad,i_color *val);
void i_copyto (i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int ty);
void i_copyto_trans(i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int ty,i_color *trans);
void i_copy (i_img *im,i_img *src);
-int i_rubthru (i_img *im,i_img *src,int tx,int ty);
+int i_rubthru (i_img *im, i_img *src, int tx, int ty, int src_minx, int src_miny, int src_maxx, int src_maxy);
+
undef_int i_flipxy (i_img *im, int direction);
extern i_img *i_rotate90(i_img *im, int degrees);
extern i_img *i_rotate_exact(i_img *im, double amount);
+extern i_img *i_rotate_exact_bg(i_img *im, double amount, i_color *backp, i_fcolor *fbackp);
extern i_img *i_matrix_transform(i_img *im, int xsize, int ysize, double *matrix);
+extern i_img *i_matrix_transform_bg(i_img *im, int xsize, int ysize, double *matrix, i_color *backp, i_fcolor *fbackp);
void i_bezier_multi(i_img *im,int l,double *x,double *y,i_color *val);
void i_poly_aa (i_img *im,int l,double *x,double *y,i_color *val);
void i_poly_aa_cfill(i_img *im,int l,double *x,double *y,i_fill_t *fill);
-void i_flood_fill (i_img *im,int seedx,int seedy,i_color *dcol);
+undef_int i_flood_fill (i_img *im,int seedx,int seedy,i_color *dcol);
+undef_int i_flood_cfill(i_img *im, int seedx, int seedy, i_fill_t *fill);
+
/* image processing functions */
undef_int i_init_t1( int t1log );
int i_t1_new( char *pfb, char *afm );
int i_t1_destroy( int font_id );
-undef_int i_t1_cp( i_img *im, int xb, int yb, int channel, int fontnum, float points, char* str, int len, int align );
-undef_int i_t1_text( i_img *im, int xb, int yb, i_color *cl, int fontnum, float points, char* str, int len, int align );
-void i_t1_bbox( int fontnum, float point, char *str, int len, int cords[6] );
+undef_int i_t1_cp( i_img *im, int xb, int yb, int channel, int fontnum, float points, char* str, int len, int align, int utf8, char const *flags );
+undef_int i_t1_text( i_img *im, int xb, int yb, i_color *cl, int fontnum, float points, char* str, int len, int align, int utf8, char const *flags );
+int i_t1_bbox( int fontnum, float point, char *str, int len, int cords[6], int utf8, char const *flags );
void i_t1_set_aa( int st );
void close_t1( void );
-
+int i_t1_has_chars(int font_num, char const *text, int len, int utf8, char *out);
+extern int i_t1_face_name(int font_num, char *name_buf, size_t name_buf_size);
+extern int i_t1_glyph_name(int font_num, unsigned long ch, char *name_buf,
+ size_t name_buf_size);
#endif
#ifdef HAVE_LIBTT
-#include <freetype.h>
-#define TT_CHC 5
-
-struct TT_Instancehandle_ {
- TT_Instance instance;
- TT_Instance_Metrics imetrics;
- TT_Glyph_Metrics gmetrics[256];
- TT_Glyph glyphs[256];
- int smooth;
- int ptsize;
- int order;
-};
-
-typedef struct TT_Instancehandle_ TT_Instancehandle;
-
-struct TT_Fonthandle_ {
- TT_Face face;
- TT_Face_Properties properties;
- TT_Instancehandle instanceh[TT_CHC];
- TT_CharMap char_map;
-};
+struct TT_Fonthandle_;
typedef struct TT_Fonthandle_ TT_Fonthandle;
-
-
undef_int i_init_tt( void );
TT_Fonthandle* i_tt_new(char *fontname);
void i_tt_destroy( TT_Fonthandle *handle );
-undef_int i_tt_cp( TT_Fonthandle *handle,i_img *im,int xb,int yb,int channel,float points,char* txt,int len,int smooth);
-undef_int i_tt_text( TT_Fonthandle *handle, i_img *im, int xb, int yb, i_color *cl, float points, char* txt, int len, int smooth);
-undef_int i_tt_bbox( TT_Fonthandle *handle, float points,char *txt,int len,int cords[6]);
-
+undef_int i_tt_cp( TT_Fonthandle *handle,i_img *im,int xb,int yb,int channel,float points,char const* txt,int len,int smooth, int utf8);
+undef_int i_tt_text( TT_Fonthandle *handle, i_img *im, int xb, int yb, i_color *cl, float points, char const* txt, int len, int smooth, int utf8);
+undef_int i_tt_bbox( TT_Fonthandle *handle, float points,char *txt,int len,int cords[6], int utf8);
+int i_tt_has_chars(TT_Fonthandle *handle, char const *text, int len, int utf8, char *out);
+void i_tt_dump_names(TT_Fonthandle *handle);
+int i_tt_face_name(TT_Fonthandle *handle, char *name_buf,
+ size_t name_buf_size);
+int i_tt_glyph_name(TT_Fonthandle *handle, unsigned long ch, char *name_buf,
+ size_t name_buf_size);
#endif /* End of freetype headers */
extern int i_ft2_settransform(FT2_Fonthandle *handle, double *matrix);
extern int i_ft2_sethinting(FT2_Fonthandle *handle, int hinting);
extern int i_ft2_bbox(FT2_Fonthandle *handle, double cheight, double cwidth,
- char *text, int len, int *bbox, int utf8);
+ char const *text, int len, int *bbox, int utf8);
extern int i_ft2_text(FT2_Fonthandle *handle, i_img *im, int tx, int ty,
i_color *cl, double cheight, double cwidth,
- char *text, int len, int align, int aa, int vlayout,
- int utf8);
+ char const *text, int len, int align, int aa,
+ int vlayout, int utf8);
extern int i_ft2_cp(FT2_Fonthandle *handle, i_img *im, int tx, int ty,
int channel, double cheight, double cwidth,
- char *text, int len, int align, int aa, int vlayout,
+ char const *text, int len, int align, int aa, int vlayout,
int utf8);
-extern int i_ft2_has_chars(FT2_Fonthandle *handle, char *text, int len,
+extern int i_ft2_has_chars(FT2_Fonthandle *handle, char const *text, int len,
int utf8, char *work);
+extern int i_ft2_face_name(FT2_Fonthandle *handle, char *name_buf,
+ size_t name_buf_size);
+extern int i_ft2_can_face_name(void);
+extern int i_ft2_glyph_name(FT2_Fonthandle *handle, unsigned long ch,
+ char *name_buf, size_t name_buf_size,
+ int reliable_only);
+extern int i_ft2_can_do_glyph_names(void);
+extern int i_ft2_face_has_glyph_names(FT2_Fonthandle *handle);
#endif
extern i_img *i_img_double_new(int x, int y, int ch);
extern i_img *i_img_double_new_low(i_img *im, int x, int y, int ch);
+
+char * i_test_format_probe(io_glue *data, int length);
+
+
#ifdef HAVE_LIBJPEG
i_img *
i_readjpeg_wiol(io_glue *ig, int length, char** iptc_itext, int *itlength);
extern int i_writebmp_wiol(i_img *im, io_glue *ig);
extern i_img *i_readbmp_wiol(io_glue *ig);
+int tga_header_verify(unsigned char headbuf[18]);
+
i_img * i_readtga_wiol(io_glue *ig, int length);
undef_int i_writetga_wiol(i_img *img, io_glue *ig, int wierdpack, int compress, char *idstring, size_t idlen);
int (*i_gpix)(i_img *im,int x,int y,i_color *val);
*/
void(*i_box)(i_img *im,int x1,int y1,int x2,int y2,i_color *val);
- void(*i_draw)(i_img *im,int x1,int y1,int x2,int y2,i_color *val);
+ void(*i_line)(i_img *im,int x1,int y1,int x2,int y2,i_color *val,int endp);
void(*i_arc)(i_img *im,int x,int y,float rad,float d1,float d2,i_color *val);
void(*i_copyto)(i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int ty);
void(*i_copyto_trans)(i_img *im,i_img *src,int x1,int y1,int x2,int y2,int tx,int ty,i_color *trans);