Transistor
authoryu.dongliang <18588496441@163.com>
Mon, 17 Jul 2023 14:42:11 +0000 (22:42 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 17 Jul 2023 14:42:11 +0000 (22:42 +0800)
ses_layout.c

index c1f8d1efbe44ad7db4000df0bf6a53042605c05f..af6ba7487712fd4e633b60f125be315307cda476 100644 (file)
@@ -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;