diff --git a/sch2fig/dwg.c b/sch2fig/dwg.c index 2298a96..08fa64a 100644 --- a/sch2fig/dwg.c +++ b/sch2fig/dwg.c @@ -11,6 +11,7 @@ */ +#define _GNU_SOURCE /* for asprintf */ #include #include #include @@ -116,6 +117,7 @@ void dwg_glabel(int x, int y, const char *s, int dir, int dim, enum box_type box; int dx, shift_flat, shift_tip; bool anchor_right = 1; + char *tag; switch (shape) { case dwg_unspec: @@ -232,6 +234,9 @@ void dwg_glabel(int x, int y, const char *s, int dir, int dim, vx[0] = vx[n - 1]; vy[0] = vy[n - 1]; gfx_poly(n, vx, vy, COLOR_GLABEL, COLOR_NONE, LAYER_GLABEL); + + if (asprintf(&tag, "G:%s", s)) {} + gfx_tag(tag, n, vx, vy); }