diff --git a/configure.in b/configure.in index b456509..477fa57 100644 --- a/configure.in +++ b/configure.in @@ -129,13 +129,15 @@ echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/" echo "" AC_MSG_ERROR([Fatal Error: no FreeType detected.])], -lm) -AC_CHECK_HEADERS(freetype.h freetype/freetype.h,[ break] , ) +AC_CHECK_HEADERS(freetype.h freetype/freetype.h freetype1/freetype/freetype.h,[ break] , ) AC_CHECK_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ]) AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ]) +AC_CHECK_HEADER(freetype1/freetype/freetype.h, [ ftype1_ftype=yes ], [ ftype1_ftype=no ]) if test x$ftype = xno; then if test x$ftype_ftype = xno; then +if test x$ftype1_ftype = xno; then echo "" echo "ERROR: freetype.h not found in freetype.h or freetype/freetype.h include" echo "paths. (ie /usr/include, /usr/local/include etc.). You need the freetype" @@ -155,6 +157,7 @@ echo "" AC_MSG_ERROR([Fatal Error: no FreeType header files detected.]) fi fi +fi AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl) EXTRA_LIBS="-L/usr/local/lib -L/usr/X11R6/lib" diff --git a/src/api.c b/src/api.c index fbaf49c..93761f5 100644 --- a/src/api.c +++ b/src/api.c @@ -24,11 +24,15 @@ #include "updates.h" #include "rgbadraw.h" #include "Imlib2.h" -#ifdef HAVE_FREETYPE_FREETYPE_H +#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H +#include +#else +#if HAVE_FREETYPE_FREETYPE_H #include #else #include #endif +#endif #include "font.h" #include "grad.h" #include "rotate.h" @@ -3236,14 +3240,33 @@ imlib_image_draw_pixel(int x, int y, char make_updates) return NULL; __imlib_DirtyImage(im); __imlib_DirtyPixmapsForImage(im); - return (Imlib_Updates) __imlib_draw_pixel(im, x, y, - (DATA8) ctx->color.red, - (DATA8) ctx->color.green, - (DATA8) ctx->color.blue, - (DATA8) ctx->color.alpha, - ctx->operation, - (char) make_updates); -} + if (ctx->cliprect.w) + { + __imlib_set_point(im, x, y, + (DATA8) ctx->color.red, + (DATA8) ctx->color.green, + (DATA8) ctx->color.blue, + (DATA8) ctx->color.alpha, + ctx->operation); + } + else + { + __imlib_set_point_clipped(im, x, y, + ctx->cliprect.x, + ctx->cliprect.x + + ctx->cliprect.w - 1, + ctx->cliprect.y, + ctx->cliprect.y + + ctx->cliprect.h - 1, + (DATA8) ctx->color.red, + (DATA8) ctx->color.green, + (DATA8) ctx->color.blue, + (DATA8) ctx->color.alpha, + ctx->operation); + } + if (!make_updates) return (Imlib_Updates) NULL; + return (Imlib_Updates) __imlib_AddUpdate(NULL, x, y, 1, 1); +} Imlib_Updates imlib_image_draw_line(int x1, int y1, int x2, int y2, char make_updates) diff --git a/src/font.c b/src/font.c index 80c0205..f669d30 100644 --- a/src/font.c +++ b/src/font.c @@ -3,11 +3,15 @@ #include "colormod.h" #include "image.h" #include "blend.h" +#ifdef HAVE_FREETYPE1_FREETYPE_FREETYPE_H +#include +#else #ifdef HAVE_FREETYPE_FREETYPE_H #include #else #include #endif +#endif #include "font.h" #include #include