ses_layout_draw()
authoryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 03:42:51 +0000 (11:42 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 03:42:51 +0000 (11:42 +0800)
ses_layout.c

index 826921157392cb43f88bc5f328ac136df0d62365..354a890f6004b6e10e6e1e963162e48fd99e2a2d 100644 (file)
@@ -1130,6 +1130,7 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_
                                                cairo_line_to(cr, p->x, p->y);
                                        }
 
+                                       cairo_stroke(cr);
                                        break;
 
                                case SCF_EDA_Resistor:
@@ -1150,6 +1151,8 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_
                                        p = c->pins[1];
                                        cairo_move_to    (cr,  p->x,       p->y);
                                        cairo_line_to    (cr,  c->x + dx1, c->y + dy1);
+
+                                       cairo_stroke(cr);
                                        break;
 
                                case SCF_EDA_Diode:
@@ -1172,6 +1175,8 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_
                                        cairo_line_to    (cr,  c->x + dx1,  c->y + dy1);
                                        cairo_rel_move_to(cr,  dx0,         dy0);
                                        cairo_rel_line_to(cr, -dx0 * 2,    -dy0 * 2);
+
+                                       cairo_stroke(cr);
                                        break;
 
                                case SCF_EDA_NPN:
@@ -1202,12 +1207,17 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_
 
                                        cairo_move_to(cr, c->x - dx3,        c->y - dy3);
                                        cairo_line_to(cr, c->x + dx3 - dx0,  c->y + dy3 - dy0);
+                                       cairo_stroke(cr);
+
+                                       cairo_set_source_rgb(cr, 0.0, 0.6, 0.0);
+                                       cairo_set_line_width(cr, 2.5);
+                                       cairo_move_to(cr, c->x + dx3 - dx0,  c->y + dy3 - dy0);
                                        cairo_line_to(cr, pc->x, pc->y);
+                                       cairo_stroke(cr);
                                        break;
                                default:
                                        break;
                        };
-                       cairo_stroke(cr);
                }
        }