diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/animgifimage-play.cxx | 4 | ||||
| -rw-r--r-- | examples/animgifimage-resize.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/animgifimage-play.cxx b/examples/animgifimage-play.cxx index 4a319f842..c5f831901 100644 --- a/examples/animgifimage-play.cxx +++ b/examples/animgifimage-play.cxx @@ -120,9 +120,9 @@ static void zoom(bool out) { // Note: deliberately no range check (use key 'N' to reset) static const double f = 1.05; if (out) - animgif.resize((double)W/f, (double)H/f); + animgif.resize(int(W/f), int(H/f)); else - animgif.resize(f*W, f*H); + animgif.resize(int(f*W), int(f*H)); } static void change_speed(int dir_) { diff --git a/examples/animgifimage-resize.cxx b/examples/animgifimage-resize.cxx index 1417255b3..a357e186c 100644 --- a/examples/animgifimage-resize.cxx +++ b/examples/animgifimage-resize.cxx @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { // set initial size to fit into window double ratio = orig->valid() ? (double)orig->w() / orig->h() : 1; int W = win.w() - 40; - int H = (double)W / ratio; + int H = int(W / ratio); printf("original size: %d x %d\n", orig->w(), orig->h()); win.size(W, H); Fl::add_handler(events); |
