for (i = 0; i < f->n_elines; i++) {
el = f->elines[i];
+ for (j = 0; j < el->n_lines; j++) {
+ el->lines[j]->x0 = INT_MAX;
+ el->lines[j]->x1 = 0;
+ }
+
for (j = 0; j < el->n_pins; j += 2) {
c = f->components[el->pins[j]];
cairo_set_line_width(cr, 2);
}
+ uint8_t text[64];
+ snprintf(text, sizeof(text) - 1, "%ld", el->id);
+
+ cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 24);
+
for (k = 0; k < el->n_lines; k++) {
l = el->lines[k];
+ cairo_move_to (cr, l->x0 - 20, l->y0 + 5);
+ cairo_show_text(cr, text);
+
cairo_move_to(cr, l->x0, l->y0);
cairo_line_to(cr, l->x1, l->y1);
}
- uint8_t text[64];
- snprintf(text, sizeof(text) - 1, "%ld", el->id);
-
- cairo_select_font_face(cr, "Georgia", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
- cairo_set_font_size (cr, 24);
- cairo_move_to (cr, l->x0 - 20, l->y0 + 5);
- cairo_show_text (cr, text);
-
cairo_stroke(cr);
}
}