imager_function_ext_table = INT2PTR(im_ext_funcs *, SvIV(get_sv(PERL_FUNCTION_TABLE_NAME, 1))); \
if (!imager_function_ext_table) \
croak("Imager API function table not found!"); \
- if (imager_function_ext_table->version != IMAGER_API_VERSION) \
- croak("Imager API version incorrect"); \
+ if (imager_function_ext_table->version != IMAGER_API_VERSION) { \
+ croak("Imager API version incorrect loaded %d vs expected %d", \
+ imager_function_ext_table->version, IMAGER_API_VERSION); \
+ } \
if (imager_function_ext_table->level < IMAGER_MIN_API_LEVEL) \
croak("API level %d below minimum of %d", imager_function_ext_table->level, IMAGER_MIN_API_LEVEL); \
} while (0)
#define i_set_image_file_limits(max_width, max_height, max_bytes) \
((im_extt->f_i_set_image_file_limits)((max_width), (max_height), (max_bytes)))
-#define i_get_image_file_limits(max_width, max_height, max_bytes) \
+#define i_get_image_file_limits(pmax_width, pmax_height, pmax_bytes) \
((im_extt->f_i_get_image_file_limits)((pmax_width), (pmax_height), (pmax_bytes)))
#define i_int_check_image_file_limits(width, height, channels, sample_size) \
((im_extt->f_i_int_check_image_file_limits)((width), (height), (channels), (sample_size)))
#define i_utf8_advance(p, s) ((im_extt->f_i_utf8_advance)((p), (s)))
+#define i_render_new(im, width) ((im_extt->f_i_render_new)((im), (width)))
+#define i_render_delete(r) ((im_extt->f_i_render_delete)(r))
+#define i_render_color(r, x, y, width, src, color) \
+ ((im_extt->f_i_render_color)((r), (x), (y), (width), (src), (color)))
+#define i_render_fill(r, x, y, width, src, fill) \
+ ((im_extt->f_i_render_fill)((r), (x), (y), (width), (src), (fill)))
+#define i_render_line(r, x, y, width, src, line, combine) \
+ ((im_extt->f_i_render_line)((r), (x), (y), (width), (src), (line), (combine)))
+#define i_render_linef(r, x, y, width, src, line, combine) \
+ ((im_extt->f_i_render_linef)((r), (x), (y), (width), (src), (line), (combine)))
+
+#ifdef IMAGER_LOG
+#define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
+#else
+#define mm_log(x)
+#endif
+
+
#endif