summaryrefslogtreecommitdiff
path: root/librsvg
diff options
context:
space:
mode:
authorRaph Levien <raph@src.gnome.org>2000-08-13 00:23:36 +0000
committerRaph Levien <raph@src.gnome.org>2000-08-13 00:23:36 +0000
commitf94709b37c8848747f57a015a68b9f5220ba1d32 (patch)
tree182beb0bf5ffac6ce222146fd8b4c564e0b126e3 /librsvg
parent0cea567ea8ebd8eba58e68a564947fc48e602f76 (diff)
downloadnautilus-f94709b37c8848747f57a015a68b9f5220ba1d32.tar.gz
Made test-ft-gtk display the entire window worth of text. Boy, does
performance suck! That will change soon enough, though :)
Diffstat (limited to 'librsvg')
-rw-r--r--librsvg/makefile-simple2
-rw-r--r--librsvg/test-ft-gtk.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/librsvg/makefile-simple b/librsvg/makefile-simple
index b53641068..731b270b3 100644
--- a/librsvg/makefile-simple
+++ b/librsvg/makefile-simple
@@ -7,7 +7,7 @@
FREETYPE_CFLAGS=-I../cut-n-paste-code
FREETYPE_LDLIBS=-L../cut-n-paste-code/freetype/.libs -lfreetype
-CFLAGS=-g -Wall -ansi $(FREETYPE_CFLAGS) `gnome-config --cflags glib libart gdk_pixbuf xml`
+CFLAGS=-g -Wall -ansi -Wno-uninitialized -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -Wsign-promo -Werror $(FREETYPE_CFLAGS) `gnome-config --cflags glib libart gdk_pixbuf xml`
LDLIBS=`gnome-config --libs glib libart gdk_pixbuf xml` -lpopt $(FREETYPE_LDLIBS)
RSVG_OBJS=art_render_gradient.o \
diff --git a/librsvg/test-ft-gtk.c b/librsvg/test-ft-gtk.c
index 1beaf6812..4d5fc1c7e 100644
--- a/librsvg/test-ft-gtk.c
+++ b/librsvg/test-ft-gtk.c
@@ -131,8 +131,16 @@ static void draw_line (TestCtx *ctx, int line_num)
static gint
test_expose (GtkWidget *widget, GdkEventExpose *event, TestCtx *ctx)
{
- /* todo: figure out which lines to redraw based on expose area */
- draw_line (ctx, 2);
+ int line0, line1;
+ int line;
+
+ line0 = (event->area.y + ctx->y_scroll) / ctx->y_sp;
+ line1 = (event->area.y + event->area.height + ctx->y_scroll +
+ ctx->y_sp - 1) / ctx->y_sp;
+ for (line = line0; line < line1; line++) {
+ g_print ("drawing line %d of [%d..%d]\n", line, line0, line1 - 1);
+ draw_line (ctx, line);
+ }
return FALSE;
}