summaryrefslogtreecommitdiffstats
path: root/generic/tkbltGrMarkerText.C
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-21 09:20:28 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-21 11:40:48 (GMT)
commitf14d9dc7c790f40e897bf4f3afaacdde6509adac (patch)
tree9decc8ccfb18a38a94568feea8c9dc66e4ff6fd2 /generic/tkbltGrMarkerText.C
parent095e27e5a9b983b7a20ea6bc4b9f4989ddb9a160 (diff)
downloadblt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.zip
blt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.tar.gz
blt-f14d9dc7c790f40e897bf4f3afaacdde6509adac.tar.bz2
Enforce explicit downcasting of numeric values
As part of the change, upgrade tkblt internal structures from short/float to int/double, as those are artifacts of the legacy code relying on X. Downcast to short at the latest stage: when interfacing with X.
Diffstat (limited to 'generic/tkbltGrMarkerText.C')
-rw-r--r--generic/tkbltGrMarkerText.C8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkbltGrMarkerText.C b/generic/tkbltGrMarkerText.C
index 5afa6ca..9c4da2a 100644
--- a/generic/tkbltGrMarkerText.C
+++ b/generic/tkbltGrMarkerText.C
@@ -148,8 +148,8 @@ void TextMarker::draw(Drawable drawable)
if (fillGC_) {
XPoint points[4];
for (int ii=0; ii<4; ii++) {
- points[ii].x = (short int)(outline_[ii].x + anchorPt_.x);
- points[ii].y = (short int)(outline_[ii].y + anchorPt_.y);
+ points[ii].x = (short)(outline_[ii].x + anchorPt_.x);
+ points[ii].y = (short)(outline_[ii].y + anchorPt_.y);
}
XFillPolygon(graphPtr_->display_, drawable, fillGC_, points, 4,
Convex, CoordModeOrigin);
@@ -179,8 +179,8 @@ void TextMarker::map()
double rw;
double rh;
graphPtr_->getBoundingBox(w, h, ops->style.angle, &rw, &rh, outline_);
- width_ = rw;
- height_ = rh;
+ width_ = (int)rw;
+ height_ = (int)rh;
for (int ii=0; ii<4; ii++) {
outline_[ii].x += rw * 0.5;
outline_[ii].y += rh * 0.5;