Solves STR #2428: Silence float->int conversion warnings

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7836 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2010-11-15 04:49:46 +00:00
parent 1c06cb4283
commit 7b9a2e88ad
2 changed files with 7 additions and 7 deletions

View File

@ -182,8 +182,8 @@ CGContextRef CreateWatchImage(void)
fl_pie(-r, -r, 2*r, 2*r, 0, 360);
fl_color(FL_BLACK);
fl_circle(0,0,r);
fl_xyline(0, 0, -r*.7);
fl_xyline(0, 0, 0, -r*.7);
fl_xyline(0, 0, int(-r*.7));
fl_xyline(0, 0, 0, int(-r*.7));
fl_end_offscreen();
return (CGContextRef)off;
}

View File

@ -129,8 +129,8 @@ else {
float fa = -FixedToFloat(bAscent), fd = -FixedToFloat(bDescent);
if (fa>0.0f && fd>0.0f) {
//float f = Size/(fa+fd);
ascent = fa; //int(fa*f+0.5f);
descent = fd; //Size - ascent;
ascent = int(fa); //int(fa*f+0.5f);
descent = int(fd); //Size - ascent;
}
int w = FixedToInt(bAfter);
if (w)
@ -335,8 +335,8 @@ void fl_text_extents(const UniChar* txt, int n, int &dx, int &dy, int &w, int &h
if (!fl_fontsize) {
check_default_font(); // avoid a crash!
if (!fl_fontsize)
w = 8.0 * n; // user must select a font first!
h = 8.0;
w = int(8.0 * n); // user must select a font first!
h = int(8.0);
return;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
@ -493,7 +493,7 @@ void Fl_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) {
}
void Fl_Graphics_Driver::rtl_draw(const char* c, int n, int x, int y) {
draw(c, n, x - fl_width(c, n), y);
draw(c, n, int(x - fl_width(c, n)), y);
}
//