Commit 8c772bdb authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

fix macro invocations so that when LCD and GRAY2/GRAY4 pixel modes are

* configure.in, src/vteglyph.c: fix macro invocations so that when LCD and
	GRAY2/GRAY4 pixel modes are supported by freetype, we don't get
	confused by them.
* src/vtepango.c, src/vtepangox.c: fix background scrolling.
parent e3f4cc36
2003-04-14 nalin
* configure.in, src/vteglyph.c: fix macro invocations so that when
LCD and GRAY2/GRAY4 pixel modes are supported by freetype, we don't
get confused by them.
* src/vtepango.c, src/vtepangox.c: fix background scrolling.
2003-04-14 nalin
* autogen.sh: require automake 1.6, 1.5 chokes on AM_LDFLAGS, which 1.7
wants instead of LDFLAGS(!). Require autoconf 2.52 or newer, because
......
......@@ -118,21 +118,21 @@ AC_CHECK_DECL(FT_RENDER_MODE_MONO,[AC_DEFINE(HAVE_DECL_FT_RENDER_MODE_MONO,1,Def
#endif
])
AC_CHECK_DECL(FT_LOAD_NO_HINTING,,,[
AC_CHECK_DECLS(FT_LOAD_NO_HINTING,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
])
AC_CHECK_DECL(FT_RENDER_MODE_LIGHT,,,[
AC_CHECK_DECLS(FT_RENDER_MODE_LIGHT,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
])
AC_CHECK_DECL(FT_RENDER_MODE_NORMAL,,,[
AC_CHECK_DECLS(FT_RENDER_MODE_NORMAL,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
......@@ -152,13 +152,13 @@ AC_CHECK_DECL(ft_pixel_mode_mono,[AC_DEFINE(HAVE_DECL_ft_pixel_mode_mono,1,Defin
#endif
])
AC_CHECK_DECL(FT_PIXEL_MODE_GRAY2,,,[
AC_CHECK_DECLS(FT_PIXEL_MODE_GRAY2,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
#endif
])
AC_CHECK_DECL(FT_PIXEL_MODE_GRAY4,,,[
AC_CHECK_DECLS(FT_PIXEL_MODE_GRAY4,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
......@@ -178,7 +178,7 @@ AC_CHECK_DECL(ft_pixel_mode_grays,[AC_DEFINE(HAVE_DECL_ft_pixel_mode_grays,1,Def
#endif
])
AC_CHECK_DECL(FT_PIXEL_MODE_LCD,,,[
AC_CHECK_DECLS(FT_PIXEL_MODE_LCD,,,[
#ifdef HAVE_FT2BUILD_H
#include <ft2build.h>
#include FT_FREETYPE_H
......
......@@ -553,11 +553,16 @@ _vte_glyph_get(struct _vte_glyph_cache *cache, gunichar c)
#else
#ifdef HAVE_DECL_ft_pixel_mode_grays
case ft_pixel_mode_grays:
#else
#error Neither FT_PIXEL_MODE_GRAY nor ft_pixel_mode_grays is defined!
#endif
#endif
ioffset += x;
r = g = b = face->glyph->bitmap.buffer[ioffset];
#endif
break;
default:
g_error("Unknown pixel mode %d.\n",
face->glyph->bitmap.pixel_mode);
g_assert_not_reached();
break;
}
......
......@@ -218,25 +218,18 @@ _vte_pango_clear(struct _vte_draw *draw,
return;
}
/* Determine the origin of the pixmap if x = y = 0. */
i = data->scrollx % data->pixmapw;
j = data->scrolly % data->pixmaph;
/* Adjust the drawing offsets. */
istart = (i + x) % data->pixmapw;
jstart = (j + y) % data->pixmaph;
/* Flood fill. */
xstop = x + width;
ystop = y + height;
j = jstart;
y = ystop - height;
j = (data->scrolly + y) % data->pixmaph;
while (y < ystop) {
h = MIN(data->pixmaph - (j % data->pixmaph),
ystop - j);
i = istart;
x = xstop - width;
i = (data->scrollx + x) % data->pixmapw;
h = MIN(data->pixmaph - (j % data->pixmaph), ystop - y);
while (x < xstop) {
w = MIN(data->pixmapw - (i % data->pixmapw),
xstop - i);
w = MIN(data->pixmapw - (i % data->pixmapw), xstop - x);
gdk_draw_drawable(draw->widget->window,
data->gc,
data->pixmap,
......
......@@ -234,7 +234,7 @@ _vte_pango_x_clear(struct _vte_draw *draw,
struct _vte_pango_x_data *data;
gint i, j, istart, jstart, h, w, xstop, ystop;
data = (struct _vte_pango_x_data*) draw->impl_data;
data = (struct _vte_pango_data*) draw->impl_data;
if ((data->pixmap == NULL) ||
(data->pixmapw == 0) ||
......@@ -247,25 +247,18 @@ _vte_pango_x_clear(struct _vte_draw *draw,
return;
}
/* Determine the origin of the pixmap if x = y = 0. */
i = data->scrollx % data->pixmapw;
j = data->scrolly % data->pixmaph;
/* Adjust the drawing offsets. */
istart = (i + x) % data->pixmapw;
jstart = (j + y) % data->pixmaph;
/* Flood fill. */
xstop = x + width;
ystop = y + height;
j = jstart;
y = ystop - height;
j = (data->scrolly + y) % data->pixmaph;
while (y < ystop) {
h = MIN(data->pixmaph - (j % data->pixmaph),
ystop - j);
i = istart;
x = xstop - width;
i = (data->scrollx + x) % data->pixmapw;
h = MIN(data->pixmaph - (j % data->pixmaph), ystop - y);
while (x < xstop) {
w = MIN(data->pixmapw - (i % data->pixmapw),
xstop - i);
w = MIN(data->pixmapw - (i % data->pixmapw), xstop - x);
gdk_draw_drawable(draw->widget->window,
data->gc,
data->pixmap,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment