Skip to content
Snippets Groups Projects
Commit 0358c221 authored by OTB Bot's avatar OTB Bot
Browse files

correction conversion double vers float (warning VS7.1)

parent eb98309d
Branches
Tags
No related merge requests found
...@@ -226,7 +226,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { ...@@ -226,7 +226,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
p = value(); p = value();
// visit each line and draw it: // visit each line and draw it:
int desc = height-fl_descent(); int desc = height-fl_descent();
float xpos = X - xscroll_ + 1; float xpos = (float)(X - xscroll_ + 1);
int ypos = -yscroll_; int ypos = -yscroll_;
for (; ypos < H;) { for (; ypos < H;) {
...@@ -241,14 +241,14 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { ...@@ -241,14 +241,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 (readonly()) erase_cursor_only = 0; // this isn't the most efficient way
if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after if (erase_cursor_only && p > pp) goto CONTINUE2; // this line is after
// calculate area to erase: // calculate area to erase:
float r = X+W; float r = (float)(X+W);
float xx; float xx;
if (p >= pp) { if (p >= pp) {
xx = X; xx = (float)(X);
if (erase_cursor_only) r = xpos+2; if (erase_cursor_only) r = xpos+2;
else if (readonly()) xx -= 3; else if (readonly()) xx -= 3;
} else { } else {
xx = xpos+expandpos(p, pp, buf, 0); xx = (float)(xpos+expandpos(p, pp, buf, 0));
if (erase_cursor_only) r = xx+2; if (erase_cursor_only) r = xx+2;
else if (readonly()) xx -= 3; else if (readonly()) xx -= 3;
} }
...@@ -268,13 +268,13 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { ...@@ -268,13 +268,13 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
int offset1 = 0; int offset1 = 0;
if (pp > p) { if (pp > p) {
fl_color(tc); 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)); fl_draw(buf, offset1, xpos, (float)(Y+ypos+desc));
} }
pp = value()+selend; pp = value()+selend;
float x2 = X+W; float x2 = (float)(X+W);
int offset2; int offset2;
if (pp <= e) x2 = xpos+expandpos(p, pp, buf, &offset2); if (pp <= e) x2 = (float)(xpos+expandpos(p, pp, buf, &offset2));
else offset2 = strlen(buf); else offset2 = strlen(buf);
fl_color(selection_color()); fl_color(selection_color());
fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height); fl_rectf((int)(x1+0.5), Y+ypos, (int)(x2-x1+0.5), height);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment