summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/rotated_text.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/rotated_text.cxx b/test/rotated_text.cxx
index faf79fc8b..a689bbd7e 100644
--- a/test/rotated_text.cxx
+++ b/test/rotated_text.cxx
@@ -62,11 +62,11 @@ class Rotated_Label_Box : public Fl_Widget{
if(rt_align&FL_ALIGN_LEFT){
dx=dy=0;
}else if(rt_align&FL_ALIGN_RIGHT){
- dy=-sin(M_PI*(double)(rt_angle+180)/180.)*(double)dx;
- dx=cos(M_PI*(double)(rt_angle+180)/180.)*(double)dx;
+ dy=(int)-sin(M_PI*(double)(rt_angle+180)/180.)*(double)dx;
+ dx=(int)cos(M_PI*(double)(rt_angle+180)/180.)*(double)dx;
}else{
- dy=sin(M_PI*(double)rt_angle/180.)*(double)dx;
- dx=-cos(M_PI*(double)rt_angle/180.)*(double)dx;
+ dy=(int)sin(M_PI*(double)rt_angle/180.)*(double)dx;
+ dx=(int)-cos(M_PI*(double)rt_angle/180.)*(double)dx;
dx/=2;dy/=2;
}
if(labeltype()==FL_SHADOW_LABEL)shadow_label(x()+w()/2+dx,y()+h()/2+dy);
@@ -136,7 +136,7 @@ void size_cb(Fl_Widget *,void *) {
window->redraw();
}
void angle_cb(Fl_Widget *,void *) {
- text->rt_angle=angles->value();
+ text->rt_angle=(int)angles->value();
window->redraw();
}