From 70aed29f7fc28db66d51256761345ef81f5fcee8 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sun, 6 Apr 2025 13:02:28 +0200 Subject: [PATCH] fix ps/svg export of highlighted instances (text color) --- src/psprint.c | 5 +++-- src/svgdraw.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/psprint.c b/src/psprint.c index e9736081..f9318c02 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -1098,10 +1098,11 @@ static void ps_draw_symbol(int c, int n,int layer, int what, short tmp_flip, sho } /* if( (!hide && xctx->enable_layer[layer]) || ... */ draw_texts: - if(xctx->inst[n].flags & PIN_OR_LABEL) c_for_text = TEXTWIRELAYER; - if(xctx->sym_txt && !(xctx->inst[n].flags & PIN_OR_LABEL)) c_for_text = TEXTLAYER; if( !(xctx->inst[n].flags & HIDE_SYMBOL_TEXTS) && (layer == cadlayers - 1)) { const char *txtptr; + if(xctx->inst[n].flags & PIN_OR_LABEL) c_for_text = TEXTWIRELAYER; + if(xctx->sym_txt && !(xctx->inst[n].flags & PIN_OR_LABEL)) c_for_text = TEXTLAYER; + if(c != layer) c_for_text = c; for(j=0;j< (xctx->inst[n].ptr+ xctx->sym)->texts; ++j) { double xscale, yscale; diff --git a/src/svgdraw.c b/src/svgdraw.c index 51af715c..a4ff90ef 100644 --- a/src/svgdraw.c +++ b/src/svgdraw.c @@ -778,10 +778,12 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot, } draw_texts: - if(xctx->inst[n].flags & PIN_OR_LABEL) c_for_text = TEXTWIRELAYER; - if(xctx->sym_txt && !(xctx->inst[n].flags & PIN_OR_LABEL)) c_for_text = TEXTLAYER; if( !(xctx->inst[n].flags & HIDE_SYMBOL_TEXTS) && (layer == cadlayers - 1)) { const char *txtptr; + if(xctx->inst[n].flags & PIN_OR_LABEL) c_for_text = TEXTWIRELAYER; + if(xctx->sym_txt && !(xctx->inst[n].flags & PIN_OR_LABEL)) c_for_text = TEXTLAYER; + if(c != layer) c_for_text = c; + for(j=0;j< symptr->texts; ++j) { double xscale, yscale;