summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-20 10:44:06 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2017-07-21 11:40:47 (GMT)
commit0383f13a9c207f08a063ef44afd151fc40156553 (patch)
tree650c92cd7b026c9921e21ad3d022f93ff64aa21d
parent2655a6b45562ceac31a7b7d82312650be57e6d1a (diff)
downloadblt-0383f13a9c207f08a063ef44afd151fc40156553.zip
blt-0383f13a9c207f08a063ef44afd151fc40156553.tar.gz
blt-0383f13a9c207f08a063ef44afd151fc40156553.tar.bz2
Upgrade getBoundingBox angle to double
-rw-r--r--generic/tkbltGrAxis.C8
-rw-r--r--generic/tkbltGrText.C2
-rw-r--r--generic/tkbltGraph.h2
-rw-r--r--generic/tkbltGraphSup.C4
4 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkbltGrAxis.C b/generic/tkbltGrAxis.C
index 49d4850..fbfa817 100644
--- a/generic/tkbltGrAxis.C
+++ b/generic/tkbltGrAxis.C
@@ -384,9 +384,9 @@ int Axis::configure()
scrollMax_ = NAN;
}
- float angle = fmod(ops->tickAngle, 360.0);
- if (angle < 0.0f)
- angle += 360.0f;
+ double angle = fmod(ops->tickAngle, 360.0);
+ if (angle < 0.0)
+ angle += 360.0;
ops->tickAngle = angle;
resetTextStyles();
@@ -1918,7 +1918,7 @@ void Axis::getGeometry()
labelPtr->width = lw;
labelPtr->height = lh;
- if (ops->tickAngle != 0.0f) {
+ if (ops->tickAngle != 0.0) {
// Rotated label width and height
double rlw, rlh;
graphPtr_->getBoundingBox(lw, lh, ops->tickAngle, &rlw, &rlh, NULL);
diff --git a/generic/tkbltGrText.C b/generic/tkbltGrText.C
index 20709f1..65725e7 100644
--- a/generic/tkbltGrText.C
+++ b/generic/tkbltGrText.C
@@ -124,7 +124,7 @@ void TextStyle::drawText2(Drawable drawable, const char *text,
rr.x, rr.y, 0, -1);
#endif
- float angle = fmod(ops->angle, 360.0);
+ double angle = fmod(ops->angle, 360.0);
if (angle < 0.0)
angle += 360.0;
diff --git a/generic/tkbltGraph.h b/generic/tkbltGraph.h
index e44bb7d..b873823 100644
--- a/generic/tkbltGraph.h
+++ b/generic/tkbltGraph.h
@@ -239,7 +239,7 @@ namespace Blt {
int getXY(const char*, int*, int*);
void getTextExtents(Tk_Font, const char*, int, int*, int*);
- void getBoundingBox(int, int, float, double*, double*, Point2d*);
+ void getBoundingBox(int, int, double, double*, double*, Point2d*);
Point2d anchorPoint(double, double, double, double, Tk_Anchor);
const char** getTags(ClientData, ClassId, int*);
diff --git a/generic/tkbltGraphSup.C b/generic/tkbltGraphSup.C
index c59012b..476a19e 100644
--- a/generic/tkbltGraphSup.C
+++ b/generic/tkbltGraphSup.C
@@ -535,12 +535,12 @@ void Graph::getTextExtents(Tk_Font font, const char *text, int textLen,
*
*---------------------------------------------------------------------------
*/
-void Graph::getBoundingBox(int width, int height, float angle,
+void Graph::getBoundingBox(int width, int height, double angle,
double *rotWidthPtr, double *rotHeightPtr,
Point2d *bbox)
{
angle = fmod(angle, 360.0);
- if (fmod(angle, (double)90.0) == 0.0) {
+ if (fmod(angle, 90.0) == 0.0) {
int ll, ur, ul, lr;
double rotWidth, rotHeight;