ScfEline* tmp;
ScfEline* el0;
ScfEline* el1;
- ScfEline* el2;
ScfEconn* ec;
size_t i;
}
#if 1
- k0 = 0;
- do {
- k1 = k0;
- k0 = 0;
-
- for (i = 0; i < f->n_elines; i++) {
- el0 = f->elines[i];
-
- if (el0->n_pins > 4)
- continue;
+ for (i = 0; i < f->n_elines; i++) {
+ el0 = f->elines[i];
- for (j = i + 1; j < f->n_elines; j++)
- f->elines[j - 1] = f->elines[j];
+ if (el0->n_pins > 4)
+ continue;
- j = __ses_find_eline_index(f, el0->conns[0]->lid);
+ for (j = i + 1; j < f->n_elines; j++)
+ f->elines[j - 1] = f->elines[j];
- if (el0->n_conns > 1) {
- m = __ses_find_eline_index(f, el0->conns[1]->lid);
+ j = __ses_find_eline_index(f, el0->conns[0]->lid);
- if (j > m)
- SCF_XCHG(j, m);
+ if (el0->n_conns > 1) {
+ m = __ses_find_eline_index(f, el0->conns[1]->lid);
- el1 = f->elines[j];
- ++j;
- } else if (j > f->n_elines / 2) {
- el1 = f->elines[j];
- ++j;
- } else {
- el1 = f->elines[j];
- }
+ if (j > m)
+ SCF_XCHG(j, m);
- for (n = f->n_elines - 1; n > j; n--)
- f->elines[n] = f->elines[n - 1];
+ el1 = f->elines[j];
+ ++j;
+ } else if (j > f->n_elines / 2) {
+ el1 = f->elines[j];
+ ++j;
+ } else {
+ el1 = f->elines[j];
+ }
- f->elines[j] = el0;
+ for (n = f->n_elines - 1; n > j; n--)
+ f->elines[n] = f->elines[n - 1];
- if (j != i) {
- k0++;
- scf_loge("mov el%ld [%ld] --> [%ld] el%ld\n", el0->id, i, j, el1->id);
- }
- }
+ f->elines[j] = el0;
- printf("k0: %ld, k1: %ld\n", k0, k1);
+ if (j == i)
+ continue;
- } while (k0 != k1);
+ scf_loge("mov el%ld [%ld] --> [%ld] el%ld\n", el0->id, i, j, el1->id);
+ }
#endif
#if 1
p1->x = c->x;
else {
p1->x += c->x - tmp;
-// p1->x = (c->x * 3 + p1->x) / 4;
+ p1->x = (c->x * 3 + p1->x) / 4;
}
if (tx0 > p1->x)
|| (c->x + dx3 + dx0 < c->x + dx3 - dx0 && pe->x < pc->x)) {
cairo_set_source_rgb(cr, 0.6, 0.6, 0.0);
- cairo_set_line_width(cr, 2);
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, c->y - dy3);
cairo_line_to(cr, c->x + dx3 - dx0, c->y + dy3 - dy0);
cairo_line_to(cr, pc->x, pc->y);
} else {
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, c->y - dy3);
cairo_line_to(cr, c->x + dx3 + dx0, c->y + dy3 + dy0);
cairo_line_to(cr, pc->x, pc->y);
cairo_stroke(cr);
cairo_set_source_rgb(cr, 0.6, 0.6, 0.0);
- cairo_set_line_width(cr, 2);
cairo_move_to(cr, c->x - dx3, c->y - dy3);
cairo_line_to(cr, c->x + dx3 - dx0, c->y + dy3 - dy0);