diff --git a/demo/gdi/nuklear_gdi.h b/demo/gdi/nuklear_gdi.h index f60a087..8efc8da 100644 --- a/demo/gdi/nuklear_gdi.h +++ b/demo/gdi/nuklear_gdi.h @@ -421,8 +421,10 @@ nk_gdi_stroke_arc(HDC dc, short cx, short cy, unsigned short r, float amin, floa end_x = cx + (int) ((float)r*nk_cos(amin)), end_y = cy + (int) ((float)r*nk_sin(amin)); + HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH)); SetArcDirection(dc, AD_COUNTERCLOCKWISE); Pie(dc, cx-r, cy-r, cx+r, cy+r, start_x, start_y, end_x, end_y); + SelectObject(dc, br); if (pen) { @@ -468,10 +470,11 @@ nk_gdi_stroke_circle(HDC dc, short x, short y, unsigned short w, pen = CreatePen(PS_SOLID, line_thickness, color); SelectObject(dc, pen); } - - SelectObject(dc, GetStockObject(NULL_BRUSH)); + + HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH)); SetDCBrushColor(dc, OPAQUE); Ellipse(dc, x, y, x + w, y + h); + SelectObject(dc, br); if (pen) { SelectObject(dc, GetStockObject(DC_PEN));