From fdab52837f579c35c26610833bc2fdc4f77503a8 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 17 Jul 2023 22:42:11 +0800 Subject: [PATCH] Transistor --- ses_layout.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ses_layout.c b/ses_layout.c index c1f8d1e..af6ba74 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -912,28 +912,25 @@ int ses_layout_draw(ScfEboard* b, uint32_t bx, uint32_t by, uint32_t bw, uint32_ pe = c->pins[SCF_EDA_Transistor_E]; vertical(&dx0, &dy0, c->x - pb->x, c->y - pb->y, 8); - vertical(&dx2, &dy2, c->x - pb->x, c->y - pb->y, -16); - forward (&dx3, &dy3, c->x - pb->x, c->y - pb->y, 16); + forward (&dx3, &dy3, c->x - pb->x, c->y - pb->y, 8); - cairo_arc(cr, c->x + dx3 / 4, c->y + dy3 / 4, 12, 0, 2 * M_PI); - - cairo_move_to (cr, pb->x, pb->y); - cairo_line_to (cr, c->x, c->y); - cairo_rel_move_to(cr, dx0, dy0); - cairo_rel_line_to(cr, dx2, dy2); + cairo_move_to (cr, pb->x, pb->y); + cairo_line_to (cr, c->x - dx3, c->y - dy3); + cairo_rel_move_to(cr, dx0, dy0); + cairo_rel_line_to(cr, -dx0 * 2, -dy0 * 2); - cairo_move_to(cr, c->x, c->y); - cairo_line_to(cr, c->x + dx3 + dx0, c->y + dy3 + dy0); + cairo_move_to(cr, c->x - dx3, c->y - dy3); + cairo_line_to(cr, c->x + dx3 + dx0, c->y + dy3 + dy0); cairo_line_to(cr, pe->x, pe->y); - vertical(&dx1, &dy1, dx3 + dx0, dy3 + dy0, 3); - forward (&dx4, &dy4, dx3 + dx0, dy3 + dy0, 8); + vertical(&dx1, &dy1, dx3 * 2 + dx0, dy3 * 2 + dy0, 3); + forward (&dx4, &dy4, dx3 * 2 + dx0, dy3 * 2 + dy0, 6); - cairo_move_to(cr, c->x + dx4 + dx1, c->y + dy4 + dy1); - cairo_line_to(cr, c->x + dx3 + dx0, c->y + dy3 + dy0); - cairo_line_to(cr, c->x + dx4 - dx1, c->y + dy4 - dy1); + cairo_move_to(cr, c->x - dx3 + dx4 + dx1, c->y - dy3 + dy4 + dy1); + cairo_line_to(cr, c->x + dx3 + dx0, c->y + dy3 + dy0); + cairo_line_to(cr, c->x - dx3 + dx4 - dx1, c->y - dy3 + dy4 - dy1); - cairo_move_to(cr, c->x, c->y); + cairo_move_to(cr, c->x - dx3, c->y - dy3); cairo_line_to(cr, c->x + dx3 - dx0, c->y + dy3 - dy0); cairo_line_to(cr, pc->x, pc->y); break; -- 2.25.1