summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoye <joye>2015-06-24 17:58:03 (GMT)
committerjoye <joye>2015-06-24 17:58:03 (GMT)
commitc2df7fc2e7873f15ecf2779b5f72a7b6bde565f2 (patch)
treec5fac71d866f095f4670d51066cdd01a6cd54e7c
parentaf9fddeb96f92bc4e9ff9f76147a6975fdd74879 (diff)
downloadblt-c2df7fc2e7873f15ecf2779b5f72a7b6bde565f2.zip
blt-c2df7fc2e7873f15ecf2779b5f72a7b6bde565f2.tar.gz
blt-c2df7fc2e7873f15ecf2779b5f72a7b6bde565f2.tar.bz2
*** empty log message ***
-rw-r--r--src/bltGrHairs.C26
-rw-r--r--src/bltGrHairs.h2
2 files changed, 17 insertions, 11 deletions
diff --git a/src/bltGrHairs.C b/src/bltGrHairs.C
index f1a0580..97bed92 100644
--- a/src/bltGrHairs.C
+++ b/src/bltGrHairs.C
@@ -107,14 +107,14 @@ void Crosshairs::map()
{
CrosshairsOptions* ops = (CrosshairsOptions*)ops_;
- segArr_[0].x1 = ops->x;
- segArr_[0].x2 = ops->x;
- segArr_[0].y1 = graphPtr_->bottom_;
- segArr_[0].y2 = graphPtr_->top_;
- segArr_[1].y1 = ops->y;
- segArr_[1].y2 = ops->y;
- segArr_[1].x1 = graphPtr_->left_;
- segArr_[1].x2 = graphPtr_->right_;
+ segArr_[0].x = ops->x;
+ segArr_[1].x = ops->x;
+ segArr_[0].y = graphPtr_->bottom_;
+ segArr_[1].y = graphPtr_->top_;
+ segArr_[2].y = ops->y;
+ segArr_[3].y = ops->y;
+ segArr_[2].x = graphPtr_->left_;
+ segArr_[3].x = graphPtr_->right_;
}
void Crosshairs::on()
@@ -135,7 +135,13 @@ void Crosshairs::draw(Drawable drawable)
if (ops->x <= graphPtr_->right_ &&
ops->x >= graphPtr_->left_ &&
ops->y <= graphPtr_->bottom_ &&
- ops->y >= graphPtr_->top_)
- XDrawSegments(graphPtr_->display_, drawable, gc_, segArr_, 2);
+ ops->y >= graphPtr_->top_) {
+ XDrawLine(graphPtr_->display_, drawable, gc_,
+ segArr_[0].x, segArr_[0].y, segArr_[1].x, segArr_[1].y);
+ XDrawLine(graphPtr_->display_, drawable, gc_,
+ segArr_[2].x, segArr_[2].y, segArr_[3].x, segArr_[3].y);
+
+ // XDrawSegments(graphPtr_->display_, drawable, gc_, segArr_, 2);
+ }
}
}
diff --git a/src/bltGrHairs.h b/src/bltGrHairs.h
index a8ee505..a8830ca 100644
--- a/src/bltGrHairs.h
+++ b/src/bltGrHairs.h
@@ -56,7 +56,7 @@ namespace Blt {
int visible_;
GC gc_;
- XSegment segArr_[2];
+ XPoint segArr_[4];
public:
Crosshairs(Graph*);