Mercurial > dwindows
changeset 385:761e5fddffca
Remove font_gap to make testing of render box drawing simpler.
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 01 May 2003 09:07:27 +0000 |
parents | cbf4df4bc2f1 |
children | 5326544ab2ec |
files | dwtest.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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);