summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx2
-rw-r--r--src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
index 48a185410..27360ccee 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx
@@ -61,7 +61,7 @@ Fl_RGB_Image* Fl_Gl_Window_Driver::capture_gl_rectangle(int x, int y, int w, int
int ns = Fl_Window_Driver::driver(glw)->screen_num();
float s = Fl::screen_driver()->scale(ns);
if (s != 1) {
- x *= s; y *= s; w *= s; h *= s;
+ x = int(x * s); y = int(y * s); w = int(w * s); h = int(h * s);
}
// Read a block of pixels from the frame buffer
int mByteWidth = w * 3;
diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
index 0a627bea6..0a92a9b2f 100644
--- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
+++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_vertex.cxx
@@ -108,7 +108,7 @@ void Fl_OpenGL_Graphics_Driver::circle(double cx, double cy, double r) {
int num_segments = (int)(10 * sqrt(rMax))+1;
double theta = 2 * M_PI / float(num_segments);
double tangetial_factor = tan(theta);
- double radial_factor = cosf(theta);//calculate the radial factor
+ double radial_factor = cos(theta);//calculate the radial factor
double x = r; //we start at angle = 0
double y = 0;