# HG changeset patch # User mhessling@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1051780047 0 # Node ID 761e5fddffca04e7d70763a728a90bd7dbed7218 # Parent cbf4df4bc2f1da478f7fad5c5160eaa3ca3b3a98 Remove font_gap to make testing of render box drawing simpler. diff -r cbf4df4bc2f1 -r 761e5fddffca dwtest.c --- a/dwtest.c Thu May 01 09:05:49 2003 +0000 +++ b/dwtest.c Thu May 01 09:07:27 2003 +0000 @@ -59,7 +59,6 @@ int font_width = 8; int font_height=12; -int font_gap = 2; int rows=100,width1=6,cols=80; char *current_file = NULL; int timerid; @@ -239,7 +238,7 @@ for ( i = 0;(i < rows) && (i+row < num_lines); i++) { fileline = i + row - 1; - y = i*(font_height+font_gap); + y = i*font_height; dw_color_background_set( 1 + (fileline % 15) ); dw_color_foreground_set( fileline % 16 ); sprintf( buf, "%6.6d", i+row ); @@ -330,7 +329,7 @@ HPIXMAP old1 = text1pm, old2 = text2pm; int depth = dw_color_depth(); - rows = height / (font_height+font_gap); + rows = height / font_height; cols = width / font_width; /* Create new pixmaps with the current sizes */ @@ -494,7 +493,7 @@ /* create render box for number pixmap */ textbox1 = dw_render_new( 100 ); dw_window_set_font(textbox1, FIXEDFONT); - dw_font_text_extents(textbox1, NULL, "Og", &font_width, &font_height); + dw_font_text_extents(textbox1, NULL, "(g", &font_width, &font_height); font_width = font_width / 2; vscrollbox = dw_box_new(BOXVERT, 0); dw_box_pack_start(vscrollbox, textbox1, font_width*width1, font_height*rows, FALSE, TRUE, 0); @@ -524,7 +523,7 @@ dw_box_pack_start(vscrollbox, 0, SCROLLBARWIDTH, SCROLLBARWIDTH, FALSE, FALSE, 0); dw_box_pack_start(pagebox, vscrollbox, 0, 0, FALSE, TRUE, 0); - text1pm = dw_pixmap_new( textbox1, (font_width*(width1+1)), font_height*rows, depth ); + text1pm = dw_pixmap_new( textbox1, font_width*width1, font_height*rows, depth ); text2pm = dw_pixmap_new( textbox2, font_width*cols, font_height*rows, depth ); dw_messagebox("DWTest", "Width: %d Height: %d\n", font_width, font_height);