Mercurial > dwindows
comparison dwtest.c @ 1282:4f0f816f1e76
Update to draw as an ellipse and fix for circles on OS/2.
This sort of works but it really needs more work.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 31 Oct 2011 02:39:40 +0000 |
parents | 70efdb4e0ce9 |
children | b99b0b2c2826 |
comparison
equal
deleted
inserted
replaced
1281:fe92a6f6d3e7 | 1282:4f0f816f1e76 |
---|---|
367 dw_color_background_set(DW_CLR_DARKRED); | 367 dw_color_background_set(DW_CLR_DARKRED); |
368 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); | 369 dw_color_foreground_set(DW_CLR_BLUE); |
370 dw_draw_polygon(window, pixmap, TRUE, 7, x, y); | 370 dw_draw_polygon(window, pixmap, TRUE, 7, x, y); |
371 dw_color_foreground_set(DW_CLR_BLACK); | 371 dw_color_foreground_set(DW_CLR_BLACK); |
372 dw_draw_rect(window, pixmap, DW_DRAW_FILL, 80, 80, 40, 40); | 372 dw_draw_rect(window, pixmap, DW_DRAW_FILL, 80, 80, 80, 40); |
373 dw_color_foreground_set(DW_CLR_CYAN); | 373 dw_color_foreground_set(DW_CLR_CYAN); |
374 /* Bottom right corner */ | 374 /* Bottom right corner */ |
375 dw_draw_arc(window, pixmap, 0, width - 30, height - 30, width - 10, height - 30, width - 30, height - 10); | 375 dw_draw_arc(window, pixmap, 0, width - 30, height - 30, width - 10, height - 30, width - 30, height - 10); |
376 /* Top right corner */ | 376 /* Top right corner */ |
377 dw_draw_arc(window, pixmap, 0, width - 30, 30, width - 30, 10, width - 10, 30); | 377 dw_draw_arc(window, pixmap, 0, width - 30, 30, width - 30, 10, width - 10, 30); |
378 /* Bottom left corner */ | 378 /* Bottom left corner */ |
379 dw_draw_arc(window, pixmap, 0, 30, height - 30, 30, height - 10, 10, height - 30); | 379 dw_draw_arc(window, pixmap, 0, 30, height - 30, 30, height - 10, 10, height - 30); |
380 /* Full circle in the left top area */ | 380 /* Full circle in the left top area */ |
381 dw_draw_arc(window, pixmap, DW_DRAW_FULL, 100, 100, 80, 80, 120, 120); | 381 dw_draw_arc(window, pixmap, DW_DRAW_FULL, 120, 100, 80, 80, 160, 120); |
382 if(image) | 382 if(image) |
383 { | 383 { |
384 if(image_stretch) | 384 if(image_stretch) |
385 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)); | 385 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)); |
386 else | 386 else |