ScfEline* el2;
ScfEconn* ec;
ScfLine* l;
+ ScfLine* l2;
uint32_t w;
uint32_t h;
n += m;
}
+ scf_logi("f->x: %d, f->y: %d, f->w: %d, f->h: %d\n", f->x, f->y, f->w, f->h);
+
+ for (i = 0; i < f->n_elines; i++) {
+ el = f->elines[i];
+
+ uint32_t sum = 0;
+
+ for (j = 0; j < el->n_conns; j++) {
+ ec = el->conns[j];
+
+ el2 = NULL;
+ for (k = 0; k < f->n_elines; k++) {
+ el2 = f->elines[k];
+
+ if (el2->id == ec->lid)
+ break;
+ }
+
+ assert(k < f->n_elines);
+ uint32_t dis = UINT_MAX;
+
+ for (k = 0; k < el->n_lines; k++) {
+ l = el->lines[k];
+
+ for (m = 0; m < el2->n_lines; m++) {
+ l2 = el2->lines[m];
+
+ uint32_t dis2;
+
+ if (l->y0 < l2->y0)
+ dis2 = l2->y0 - l->y0;
+ else
+ dis2 = l->y0 - l2->y0;
+
+ if (dis > dis2)
+ dis = dis2;
+ }
+ }
+
+ sum += dis;
+ }
+
+ scf_logi("el->id: %ld, sum: %d\n", el->id, sum);
+ }
return 0;
}