1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-17 21:16:15 +02:00

eeshow/lib-render.c (draw_arc): support filling

This commit is contained in:
Werner Almesberger 2016-08-16 02:31:27 -03:00
parent 7603e917c3
commit ae80cde66c

View File

@ -131,10 +131,28 @@ static void draw_arc(const struct lib_arc *arc, const int m[6])
} }
} }
/*
* cr_arc (and maybe others) close the arc if filling, so we supply a
* foreground color as well. Other objects are closed and don't need
* need a foreground color when filling.
*/
switch (arc->fill) {
case 'N':
break;
case 'F':
gfx_arc(x, y, arc->r, sa, ea,
COLOR_COMP_DWG, COLOR_COMP_DWG, LAYER_COMP_DWG_BG);
break;
case 'f':
gfx_arc(x, y, arc->r, sa, ea,
COLOR_COMP_DWG_BG, COLOR_COMP_DWG_BG, LAYER_COMP_DWG_BG);
break;
default:
assert(0);
}
gfx_arc(x, y, arc->r, sa, ea, gfx_arc(x, y, arc->r, sa, ea,
COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG); COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG);
assert(arc->fill == 'N');
} }