Corrected the fill bugs in the GDI binding
This commit is contained in:
parent
628cc61263
commit
dca0f6fcfc
|
@ -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_x = cx + (int) ((float)r*nk_cos(amin)),
|
||||||
end_y = cy + (int) ((float)r*nk_sin(amin));
|
end_y = cy + (int) ((float)r*nk_sin(amin));
|
||||||
|
|
||||||
|
HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH));
|
||||||
SetArcDirection(dc, AD_COUNTERCLOCKWISE);
|
SetArcDirection(dc, AD_COUNTERCLOCKWISE);
|
||||||
Pie(dc, cx-r, cy-r, cx+r, cy+r, start_x, start_y, end_x, end_y);
|
Pie(dc, cx-r, cy-r, cx+r, cy+r, start_x, start_y, end_x, end_y);
|
||||||
|
SelectObject(dc, br);
|
||||||
|
|
||||||
if (pen)
|
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);
|
pen = CreatePen(PS_SOLID, line_thickness, color);
|
||||||
SelectObject(dc, pen);
|
SelectObject(dc, pen);
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject(dc, GetStockObject(NULL_BRUSH));
|
HGDIOBJ br = SelectObject(dc, GetStockObject(NULL_BRUSH));
|
||||||
SetDCBrushColor(dc, OPAQUE);
|
SetDCBrushColor(dc, OPAQUE);
|
||||||
Ellipse(dc, x, y, x + w, y + h);
|
Ellipse(dc, x, y, x + w, y + h);
|
||||||
|
SelectObject(dc, br);
|
||||||
|
|
||||||
if (pen) {
|
if (pen) {
|
||||||
SelectObject(dc, GetStockObject(DC_PEN));
|
SelectObject(dc, GetStockObject(DC_PEN));
|
||||||
|
|
Loading…
Reference in New Issue