summaryrefslogtreecommitdiff
path: root/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-13 21:12:52 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-02-13 21:13:04 +0100
commit9fad60140167661bfa1f442db3b81ba9e10d37e9 (patch)
tree564b6cdd0e52c523a9a51e136d2edb0bbd60ece2 /src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
parent5ade8fcb09ad2f30d0ee84228f062bdfc8ecdc50 (diff)
Remove compilation warnings issued by Visual Studio 2019.
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx')
-rw-r--r--src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
index 6055ab1a5..9bd3aaa44 100644
--- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
+++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_arci.cxx
@@ -32,29 +32,29 @@
void Fl_GDI_Graphics_Driver::arc_unscaled(float x, float y, float w, float h, double a1, double a2) {
if (w <= 0 || h <= 0) return;
- int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
- int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
- int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
- int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
+ int xa = int( x+w/2+int(w*cos(a1/180.0*M_PI)) );
+ int ya = int( y+h/2-int(h*sin(a1/180.0*M_PI)) );
+ int xb = int( x+w/2+int(w*cos(a2/180.0*M_PI)) );
+ int yb = int( y+h/2-int(h*sin(a2/180.0*M_PI)) );
if (fabs(a1 - a2) < 90) {
if (xa == xb && ya == yb) SetPixel(gc_, xa, ya, fl_RGB());
- else Arc(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
- } else Arc(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
+ else Arc(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
+ } else Arc(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
}
void Fl_GDI_Graphics_Driver::pie_unscaled(float x, float y, float w, float h, double a1, double a2) {
if (w <= 0 || h <= 0) return;
if (a1 == a2) return;
- int xa = x+w/2+int(w*cos(a1/180.0*M_PI));
- int ya = y+h/2-int(h*sin(a1/180.0*M_PI));
- int xb = x+w/2+int(w*cos(a2/180.0*M_PI));
- int yb = y+h/2-int(h*sin(a2/180.0*M_PI));
+ int xa = int( x+w/2+int(w*cos(a1/180.0*M_PI)) );
+ int ya = int( y+h/2-int(h*sin(a1/180.0*M_PI)) );
+ int xb = int( x+w/2+int(w*cos(a2/180.0*M_PI)) );
+ int yb = int( y+h/2-int(h*sin(a2/180.0*M_PI)) );
SelectObject(gc_, fl_brush());
if (fabs(a1 - a2) < 90) {
if (xa == xb && ya == yb) {
- MoveToEx(gc_, x+w/2, y+h/2, 0L);
+ MoveToEx(gc_, int(x+w/2), int(y+h/2), 0L);
LineTo(gc_, xa, ya);
SetPixel(gc_, xa, ya, fl_RGB());
- } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
- } else Pie(gc_, x, y, x+w, y+h, xa, ya, xb, yb);
+ } else Pie(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
+ } else Pie(gc_, int(x), int(y), int(x+w), int(y+h), xa, ya, xb, yb);
}