Date:2012-07-19 01:38:14 (7 years 4 months ago)
Author:Werner Almesberger
Commit:26b74e867afcf5a6e0dab7a78c6bdb801062d078
Message:postscript.c (hatch): change argument from layer set to pad type

For sharing.
Files: postscript.c (3 diffs)

Change Details

postscript.c
238238}
239239
240240
241static const char *hatch(layer_type layers)
241static const char *hatch(enum pad_type type)
242242{
243    switch (layers_to_pad_type(layers)) {
243    switch (type) {
244244    case pt_normal:
245245        return "crosspath";
246246    case pt_bare:
...... 
260260static void ps_pad(FILE *file, const struct inst *inst, int show_name)
261261{
262262    ps_filled_box(file, inst->base, inst->u.pad.other,
263        hatch(inst->u.pad.layers));
263        hatch(layers_to_pad_type(inst->u.pad.layers)));
264264
265265    if (show_name && !inst->u.pad.hole)
266266        ps_pad_name(file, inst);
...... 
296296    fprintf(file, "0 setgray %d setlinewidth\n", PS_HATCH_LINE);
297297    ps_rounded_rect(file, inst->base, inst->u.pad.other);
298298    fprintf(file, " closepath gsave %s grestore stroke\n",
299        hatch(inst->u.pad.layers));
299        hatch(layers_to_pad_type(inst->u.pad.layers)));
300300
301301    if (show_name && !inst->u.pad.hole)
302302        ps_pad_name(file, inst);

Archive Download the corresponding diff file

Branches:
master



interactive