1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-12-22 23:28:38 +02:00

postscript.c (hatch): change argument from layer set to pad type

For sharing.
This commit is contained in:
Werner Almesberger 2012-07-18 20:38:14 -03:00
parent 238830c02d
commit 26b74e867a

View File

@ -238,9 +238,9 @@ static void ps_pad_name(FILE *file, const struct inst *inst)
}
static const char *hatch(layer_type layers)
static const char *hatch(enum pad_type type)
{
switch (layers_to_pad_type(layers)) {
switch (type) {
case pt_normal:
return "crosspath";
case pt_bare:
@ -260,7 +260,7 @@ static const char *hatch(layer_type layers)
static void ps_pad(FILE *file, const struct inst *inst, int show_name)
{
ps_filled_box(file, inst->base, inst->u.pad.other,
hatch(inst->u.pad.layers));
hatch(layers_to_pad_type(inst->u.pad.layers)));
if (show_name && !inst->u.pad.hole)
ps_pad_name(file, inst);
@ -296,7 +296,7 @@ static void ps_rpad(FILE *file, const struct inst *inst, int show_name)
fprintf(file, "0 setgray %d setlinewidth\n", PS_HATCH_LINE);
ps_rounded_rect(file, inst->base, inst->u.pad.other);
fprintf(file, " closepath gsave %s grestore stroke\n",
hatch(inst->u.pad.layers));
hatch(layers_to_pad_type(inst->u.pad.layers)));
if (show_name && !inst->u.pad.hole)
ps_pad_name(file, inst);