Mercurial > dwindows
changeset 1270:24f1dc19601d
Implemented DW_DRAW_FULL on Windows and implemented DW_DRAW_FILL for ellipses.
Fixed not passing DW_DRAW_FULL in the test program.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 30 Oct 2011 01:41:14 +0000 |
parents | 9e477efbacca |
children | 8655753e2bc4 |
files | dwtest.c win/dw.c |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/dwtest.c Sun Oct 30 00:40:22 2011 +0000 +++ b/dwtest.c Sun Oct 30 01:41:14 2011 +0000 @@ -376,7 +376,7 @@ /* Bottom left corner */ dw_draw_arc(window, pixmap, 0, 30, height - 30, 30, height - 10, 10, height - 30); /* Full circle in the left top area */ - dw_draw_arc(window, pixmap, 0, 100, 100, 80, 80, 120, 120); + dw_draw_arc(window, pixmap, DW_DRAW_FULL, 100, 100, 80, 80, 120, 120); if(image) { if(image_stretch)
--- a/win/dw.c Sun Oct 30 00:40:22 2011 +0000 +++ b/win/dw.c Sun Oct 30 01:41:14 2011 +0000 @@ -8843,10 +8843,16 @@ hdcPaint = pixmap->hdc; else return; - - oldBrush = SelectObject( hdcPaint, TlsGetValue(_hBrush) ); + + if(flags & DW_DRAW_FILL) + oldBrush = SelectObject( hdcPaint, TlsGetValue(_hBrush) ); + else + oldBrush = SelectObject( hdcPaint, GetStockObject(HOLLOW_BRUSH) ); oldPen = SelectObject( hdcPaint, TlsGetValue(_hPen) ); - Arc(hdcPaint, xorigin-r, yorigin-r, xorigin+r, yorigin+r, x2, y2, x1, y1); + if(flags & DW_DRAW_FULL) + Ellipse(hdcPaint, x1, y1, x2, y2); + else + Arc(hdcPaint, xorigin-r, yorigin-r, xorigin+r, yorigin+r, x2, y2, x1, y1); SelectObject( hdcPaint, oldBrush ); SelectObject( hdcPaint, oldPen );