_simplify_draw()
authoryu.dongliang <18588496441@163.com>
Fri, 20 Oct 2023 08:48:26 +0000 (16:48 +0800)
committeryu.dongliang <18588496441@163.com>
Fri, 20 Oct 2023 08:48:26 +0000 (16:48 +0800)
ses_step_simplify.c

index b4ec223db5f49a84f0e7f648857c162af6fe4948..a6a86a3227a28978bdbdf6b573f71562c7c3e597 100644 (file)
@@ -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];