From 5d13131ba70b5f8e6956b3171c4de4fcbaddfb17 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Fri, 20 Oct 2023 16:48:26 +0800 Subject: [PATCH] _simplify_draw() --- ses_step_simplify.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) 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]; -- 2.25.1