From: yu.dongliang <18588496441@163.com> Date: Mon, 30 Oct 2023 03:42:51 +0000 (+0800) Subject: ses_layout_draw() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=c1d058da71aa6d78333456607892efaef067de25;p=ses.git ses_layout_draw() --- diff --git a/ses_layout.c b/ses_layout.c index 8269211..354a890 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -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); } }