summaryrefslogtreecommitdiff
path: root/src/GipfelWidget.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2005-04-14 19:15:45 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2005-04-14 19:15:45 +0000
commitb7861c0a98136b5e1a81002b36dd4453b82df106 (patch)
treebdf6f23f56a2ca2992d8fc2f01a014b88945d051 /src/GipfelWidget.cxx
parent820bc8b679188e4c4ab88f62cbde886fe240d36d (diff)
add nick angle support
add nick angle support
Diffstat (limited to 'src/GipfelWidget.cxx')
-rw-r--r--src/GipfelWidget.cxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx
index faf70d1..f4ad159 100644
--- a/src/GipfelWidget.cxx
+++ b/src/GipfelWidget.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: GipfelWidget.cxx,v 1.6 2005/04/14 19:54:58 hofmann Exp $"
+// "$Id: GipfelWidget.cxx,v 1.7 2005/04/14 21:15:45 hofmann Exp $"
//
// PSEditWidget routines.
//
@@ -73,7 +73,8 @@ GipfelWidget::set_viewpoint(const char *pos) {
void
GipfelWidget::draw() {
Mountain *m;
- int center = w() / 2;
+ int center_x = w() / 2;
+ int center_y = h() / 2;
if (img == NULL) {
return;
@@ -82,8 +83,6 @@ GipfelWidget::draw() {
fl_push_clip(x(), y(), w(), h());
img->draw(x(),y(),w(),h(),0,0);
-
-
fl_font(FL_COURIER, 10);
m = pan->get_visible_mountains();
while (m) {
@@ -93,8 +92,14 @@ GipfelWidget::draw() {
fl_color(FL_BLACK);
}
- fl_line(center + m->x + x(), 0 + y(), center + m->x + x(), h() + y());
- fl_draw(m->name, center + m->x + x(), 20 + y() + (int) m->height / 8);
+ fl_rectf(center_x + m->x + x() - 2,
+ center_y + m->y + y() - 2,
+ 4,
+ 4);
+ // fl_line(center_x + m->x + x(), 0 + y(), center_x + m->x + x(), h() + y());
+ fl_draw(m->name,
+ center_x + m->x + x(),
+ center_y + m->y + y());
m = m->get_next_visible();
}
@@ -143,6 +148,12 @@ GipfelWidget::set_center_angle(double a) {
}
void
+GipfelWidget::set_nick_angle(double a) {
+ pan->set_nick_angle(a);
+ redraw();
+}
+
+void
GipfelWidget::set_scale(double s) {
pan->set_scale(s);
redraw();