Corrected the fill bugs in the GDI binding

This commit is contained in:
Benedikt Müssig 2022-05-12 13:30:18 +02:00 committed by GitHub
parent 628cc61263
commit dca0f6fcfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -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)
{
@ -469,9 +471,10 @@ nk_gdi_stroke_circle(HDC dc, short x, short y, unsigned short w,
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));