diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-07-30 20:33:07 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-07-30 20:33:07 +0100 |
commit | 9645b4f9b25734ae6ff9fd9bae2fa1e607484c0e (patch) | |
tree | 5f91329843428c039473a7638a35678b4162df12 | |
parent | feee5525398160280fbb12d8fb340ceef20c67d3 (diff) |
increase line width for tracks
fix label placement bug
-rw-r--r-- | src/GipfelWidget.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 9cfbdb6..f82a2cf 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -189,6 +189,7 @@ GipfelWidget::draw() { int last_x, last_y, last_initialized = 0; fl_color(FL_RED); + fl_line_style(FL_SOLID, 2); for (i=1; i<track_points->get_num(); i++) { if (last_initialized) { fl_line(center_x + x() + last_x, @@ -200,6 +201,7 @@ GipfelWidget::draw() { last_y = track_points->get(i)->y; last_initialized++; } + fl_line_style(0); } fl_pop_clip(); @@ -217,19 +219,19 @@ GipfelWidget::set_labels(Hills *v) { Hill *m, *n; fl_font(FL_HELVETICA, 10); + height = fl_height(); for (i=0; i<v->get_num(); i++) { m = v->get(i); - if (m->flags & HILL_DUPLICATE) { + if (m->flags & (HILL_DUPLICATE | HILL_TRACK_POINT)) { continue; } - fl_measure(m->name, width, height); + width = (int) ceilf(fl_width(m->name)); m->label_x = m->x + width; m->label_y = m->y; - - for (j=0; j<v->get_num() && j < i; j++) { + for (j=0; j < i; j++) { n = v->get(j); if (n->flags & (HILL_DUPLICATE | HILL_TRACK_POINT)) { |