p0 = c->pins[el0->pins[m + 1]];
p1 = c->pins[el1->pins[n + 1]];
- p0->x = el0->lines[0]->x1 + j * d + 10 + rand() % d;
- p1->x = el1->lines[0]->x1 + j * d + 10 + rand() % d;
+ p0->x = el0->lines[0]->x1 + j * d + 10 + rand() % 20;
+ p1->x = el1->lines[0]->x1 + j * d + 10 + rand() % 20;
p0->y = el0->lines[0]->y0;
p1->y = el1->lines[0]->y0;
if (0 == p0->x) {
- p0->x = el0->lines[0]->x1 + d + 10 + rand() % d;
+ p0->x = el0->lines[0]->x1 + d + 10 + rand() % 20;
p0->y = el0->lines[0]->y1;
el0->lines[0]->x1 = p0->x;
{
ScfEcomponent* c;
ScfEline* el;
+ ScfEline* el2;
ScfEpin* p0;
ScfEpin* p1;
cx = c->x;
for (k = 0; k < c->n_pins; k++) {
+ p1 = c->pins[k];
+
if (k < 2)
- c->pins[k]->x = c->x;
+ p1->x = c->x;
else
- c->pins[k]->x += c->x - tmp;
+ p1->x += c->x - tmp;
+
+ el2 = f->elines[p1->lid];
+
+ if (el2->lines[0]->x1 < p1->x) {
+ el2->lines[0]->x1 = p1->x;
+
+ if (f->w < p1->x)
+ f->w = p1->x;
+ }
}
if (x0 > p0->x)
el->lines[0]->x0 = x0;
el->lines[0]->x1 = x1;
+
+ if (f->w < x1)
+ f->w = x1;
}
- f->w -= mx - 3 * d + px - nx;
+ f->w += d;
f->h += d;
scf_loge("f->x: %d, y: %d, w: %d, h: %d\n", f->x, f->y, f->w, f->h);