diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 14 | ||||
| -rw-r--r-- | src/fl_read_image_win32.cxx | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index b22284b43..26d586105 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -246,7 +246,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { p = value(); // visit each line and draw it: int desc = height-fl_descent(); - float xpos = X - xscroll_ + 1; + float xpos = (float)(X - xscroll_ + 1); int ypos = -yscroll_; for (; ypos < H;) { @@ -261,14 +261,14 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { if (readonly()) erase_cursor_only = 0; // this isn't the most efficient way if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after // calculate area to erase: - float r = X+W; + float r = (float)(X+W); float xx; if (p >= pp) { - xx = X; + xx = (float)X; if (erase_cursor_only) r = xpos+2; else if (readonly()) xx -= 3; } else { - xx = xpos+expandpos(p, pp, buf, 0); + xx = xpos + (float)expandpos(p, pp, buf, 0); if (erase_cursor_only) r = xx+2; else if (readonly()) xx -= 3; } @@ -288,13 +288,13 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { int offset1 = 0; if (pp > p) { fl_color(tc); - x1 += expandpos(p, pp, buf, &offset1); + x1 += (float)expandpos(p, pp, buf, &offset1); fl_draw(buf, offset1, xpos, (float)(Y+ypos+desc)); } pp = value()+selend; - float x2 = X+W; + float x2 = (float)(X+W); int offset2; - if (pp <= e) x2 = xpos+expandpos(p, pp, buf, &offset2); + if (pp <= e) x2 = xpos + (float)expandpos(p, pp, buf, &offset2); else offset2 = strlen(buf); fl_color(selection_color()); fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height); diff --git a/src/fl_read_image_win32.cxx b/src/fl_read_image_win32.cxx index b218d598f..52b88ed58 100644 --- a/src/fl_read_image_win32.cxx +++ b/src/fl_read_image_win32.cxx @@ -55,11 +55,11 @@ fl_read_image(uchar *p, // I - Pixel buffer or NULL to allocate for (x = 0; x < w; x ++, ptr += d) { COLORREF c = GetPixel(fl_gc, X + x, Y + y); - ptr[0] = c; + ptr[0] = (uchar)c; c >>= 8; - ptr[1] = c; + ptr[1] = (uchar)c; c >>= 8; - ptr[2] = c; + ptr[2] = (uchar)c; } } |
