From: yu.dongliang <18588496441@163.com> Date: Fri, 20 Oct 2023 08:48:26 +0000 (+0800) Subject: _simplify_draw() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=5d13131ba70b5f8e6956b3171c4de4fcbaddfb17;p=ses.git _simplify_draw() --- diff --git a/ses_step_simplify.c b/ses_step_simplify.c index b4ec223..a6a86a3 100644 --- a/ses_step_simplify.c +++ b/ses_step_simplify.c @@ -33,23 +33,31 @@ static int _simplify_draw(ScfEfunction* f, uint32_t bx, uint32_t by, uint32_t bw for (j = 0; j < f->n_elines; j++) { el = f->elines[j]; - cairo_set_line_width(cr, 3); + cairo_set_line_width(cr, 2); - if ((SCF_EDA_PIN_POS & el->flags) || el->v == B->pins[SCF_EDA_Battery_POS]->v) + if (SCF_EDA_PIN_POS & el->flags) { cairo_set_source_rgb(cr, 1, 0, 0); + cairo_set_line_width(cr, 4); - else if ((SCF_EDA_PIN_NEG & el->flags) || el->v == B->pins[SCF_EDA_Battery_NEG]->v) + } else if (SCF_EDA_PIN_NEG & el->flags) { cairo_set_source_rgb(cr, 0, 0, 1); + cairo_set_line_width(cr, 4); + + } else if (el->v == B->pins[SCF_EDA_Battery_POS]->v) { + cairo_set_source_rgb(cr, 1, 0, 0); + cairo_set_line_width(cr, 2.5); - else if (SCF_EDA_PIN_IN & el->flags) + } else if (el->v == B->pins[SCF_EDA_Battery_NEG]->v) { + cairo_set_source_rgb(cr, 0, 0, 1); + cairo_set_line_width(cr, 2.5); + + } else if (SCF_EDA_PIN_IN & el->flags) cairo_set_source_rgb(cr, 0, 1, 0); else if (SCF_EDA_PIN_OUT & el->flags) cairo_set_source_rgb(cr, 1, 0, 1); - else { + else cairo_set_source_rgb(cr, 1, 0.5, 0.1); - cairo_set_line_width(cr, 2); - } for (k = 0; k < el->n_lines; k++) { l = el->lines[k];