diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-02-10 10:31:43 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-02-10 10:31:43 +0000 |
| commit | 4079e7590b6307e7811671388291577dbeef17f6 (patch) | |
| tree | 4181acf2312230e5f4abb2f65e70f596f1195f68 | |
| parent | 94f0278d4771c816f3303efd2e8fa10fc6c41b7a (diff) | |
Fix MSWindows compile issues.
Fixed a few warnings and a compilation issue introduced from previous reorganization.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Shared_Image.cxx | 4 | ||||
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx | 6 | ||||
| -rw-r--r-- | src/fl_gleam.cxx | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 7b96157dd..d568f0675 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -553,7 +553,7 @@ void Fl_Gl_Window::draw() { glLoadIdentity(); glOrtho(-0.5, w()-0.5, h()-0.5, -0.5, -1, 1); // glOrtho(0, w(), h(), 0, -1, 1); - glLineWidth(pixels_per_unit()); // should be 1 or 2 (2 if highres OpenGL) + glLineWidth((GLfloat)pixels_per_unit()); // should be 1 or 2 (2 if highres OpenGL) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // FIXME: push on state stack glEnable(GL_BLEND); // FIXME: push on state stack diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 757c51b42..fa9a03c8e 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -390,8 +390,8 @@ void Fl_Shared_Image::scale(int width, int height, int proportional, int can_exp if (fw < 1) fw = 1; if (fh < 1) fh = 1; } - w(image_->w() / fw); - h(image_->h() / fh); + w((int)(image_->w() / fw)); + h((int)(image_->h() / fh)); } diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx index 0eaf23752..3bc9fedbe 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver.cxx @@ -112,7 +112,7 @@ void Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha(int x,int y,int w,int h,H SelectObject(new_gc, bitmap); BOOL alpha_ok = 0; // first try to alpha blend - if ( fl_can_do_alpha_blending() ) { + if ( can_do_alpha_blending() ) { alpha_ok = fl_alpha_blend(fl_gc, x, y, w, h, new_gc, srcx, srcy, w, h, blendfunc); } // if that failed (it shouldn't), still copy the bitmap over, but now alpha is 1 diff --git a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx index 909242cd2..7209cbd7b 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Graphics_Driver_font.cxx @@ -88,7 +88,7 @@ void Fl_OpenGL_Graphics_Driver::text_extents(const char *str, int n, int& dx, in { dx = 0; dy = descent(); - w = width(str, n); + w = (int)width(str, n); h = size_; } @@ -120,8 +120,8 @@ void Fl_OpenGL_Graphics_Driver::draw(const char *str, int n, int x, int y) if (!rendering) { glBegin(GL_LINE_STRIP); rendering = 1; } int vx = (cmd & '\70')>>3; int vy = (cmd & '\07'); - px = 0.5+x+vx*size_*0.5/8.0; - py = 0.5+y+vy*size_/8.0-0.8*size_; + px = (int)(0.5+x+vx*size_*0.5/8.0); + py = (int)(0.5+y+vy*size_/8.0-0.8*size_); glVertex2f(px, py); } } diff --git a/src/fl_gleam.cxx b/src/fl_gleam.cxx index 39d384adf..087f4baf4 100644 --- a/src/fl_gleam.cxx +++ b/src/fl_gleam.cxx @@ -39,8 +39,8 @@ static void shade_rect_top_bottom(int x, int y, int w, int h, Fl_Color fg1, Fl_C int h_bottom = ((h/6) < (15) ? (h/6) : (15)); // min(h/6,15); int h_flat = h-(h_top+h_bottom); int j = 0; - float step_size_top = h_top>1?(0.999/(float)(h_top)):1; - float step_size_bottom = h_bottom>1?(0.999/(float)(h_bottom)):1; + float step_size_top = h_top>1?(0.999f/(float)(h_top)):1; + float step_size_bottom = h_bottom>1?(0.999f/(float)(h_bottom)):1; // This loop generates the gradient at the top of the widget for (float k = 1; k >= 0; k -= step_size_top){ gleam_color(fl_color_average(fl_color_average(fg1, fg2, th), fg1, k)); |
