comparison dwtest.c @ 1259:2d2b945ee0bf

Added a polygon to the test code to make sure that works on all platforms.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 25 Oct 2011 06:13:36 +0000
parents c191a562c14a
children 61d0c5f84644
comparison
equal deleted inserted replaced
1258:3df86772b625 1259:2d2b945ee0bf
350 { 350 {
351 HPIXMAP hpm = hpma ? hpma : text2pm; 351 HPIXMAP hpm = hpma ? hpma : text2pm;
352 int width = (int)DW_PIXMAP_WIDTH(hpm), height = (int)DW_PIXMAP_HEIGHT(hpm); 352 int width = (int)DW_PIXMAP_WIDTH(hpm), height = (int)DW_PIXMAP_HEIGHT(hpm);
353 HPIXMAP pixmap = direct ? NULL : hpm; 353 HPIXMAP pixmap = direct ? NULL : hpm;
354 HWND window = direct ? textbox2 : 0; 354 HWND window = direct ? textbox2 : 0;
355 355 int x[7] = { 20, 180, 180, 230, 180, 180, 20 };
356 int y[7] = { 50, 50, 20, 70, 120, 90, 90 };
357
356 image_x = (int)dw_spinbutton_get_pos(imagexspin); 358 image_x = (int)dw_spinbutton_get_pos(imagexspin);
357 image_y = (int)dw_spinbutton_get_pos(imageyspin); 359 image_y = (int)dw_spinbutton_get_pos(imageyspin);
358 image_stretch = dw_checkbox_get(imagestretchcheck); 360 image_stretch = dw_checkbox_get(imagestretchcheck);
359 361
360 dw_color_foreground_set(DW_CLR_WHITE); 362 dw_color_foreground_set(DW_CLR_WHITE);
362 dw_color_foreground_set(DW_CLR_DARKPINK); 364 dw_color_foreground_set(DW_CLR_DARKPINK);
363 dw_draw_rect(window, pixmap, TRUE, 10, 10, width - 20, height - 20); 365 dw_draw_rect(window, pixmap, TRUE, 10, 10, width - 20, height - 20);
364 dw_color_foreground_set(DW_CLR_GREEN); 366 dw_color_foreground_set(DW_CLR_GREEN);
365 dw_color_background_set(DW_CLR_DARKRED); 367 dw_color_background_set(DW_CLR_DARKRED);
366 dw_draw_text(window, pixmap, 10, 10, "This should be aligned with the edges."); 368 dw_draw_text(window, pixmap, 10, 10, "This should be aligned with the edges.");
369 dw_color_foreground_set(DW_CLR_BLUE);
370 dw_draw_polygon(window, pixmap, TRUE, 7, x, y);
367 if(image) 371 if(image)
368 { 372 {
369 if(image_stretch) 373 if(image_stretch)
370 dw_pixmap_stretch_bitblt(window, pixmap, 10, 10, width - 20, height - 20, 0, image, 0, 0, (int)DW_PIXMAP_WIDTH(image), (int)DW_PIXMAP_HEIGHT(image)); 374 dw_pixmap_stretch_bitblt(window, pixmap, 10, 10, width - 20, height - 20, 0, image, 0, 0, (int)DW_PIXMAP_WIDTH(image), (int)DW_PIXMAP_HEIGHT(image));
371 else 375 else