Author: mordante
Date: Tue Apr 29 21:47:38 2008
New Revision: 26238
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26238&view=rev
Log:
Let the image class of the canvas use not optimized images.
Modified:
trunk/src/gui/widgets/canvas.cpp
Modified: trunk/src/gui/widgets/canvas.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/canvas.cpp?rev=26238&r1=26237&r2=26238&view=diff
==============================================================================
--- trunk/src/gui/widgets/canvas.cpp (original)
+++ trunk/src/gui/widgets/canvas.cpp Tue Apr 29 21:47:38 2008
@@ -542,7 +542,8 @@
*
*/
- image_.assign(image::get_image(image::locator(cfg["name"])));
+ image_.assign(make_neutral_surface(
+ image::get_image(image::locator(cfg["name"]))));
src_clip_ = ::create_rect(0, 0, image_->w, image_->h);
const std::string& debug = (cfg["debug"]);
@@ -580,7 +581,7 @@
DBG_G_D << "Image: vertical stretch from " <<
image_->w
<< ',' << image_->h << " to a height of
" << h << ".\n";
- surf = stretch_surface_vertical(image_, h);
+ surf = stretch_surface_vertical(image_, h,
false);
done = true;
}
w = image_->w;
@@ -591,7 +592,7 @@
DBG_G_D << "Image: horizontal stretch from " <<
image_->w
<< ',' << image_->h << " to a width of
" << w << ".\n";
- surf = stretch_surface_horizontal(image_, w);
+ surf = stretch_surface_horizontal(image_, w,
false);
done = true;
}
h = image_->h;
@@ -602,7 +603,7 @@
DBG_G_D << "Image: scaling from " << image_->w
<< ',' << image_->h << " to " << w << ',' << h
<< ".\n";
- surf = scale_surface(image_, w, h);
+ surf = scale_surface(image_, w, h, false);
}
src_clip.w = w;
src_clip.h = h;
@@ -610,14 +611,8 @@
surf = image_;
}
- // FIXME the scale and strech return an optimized surface which needs
- // to be turned into a not optimized surface again, so it would be nice
- // to add a parameter whether or not to optimize.
- surf = make_neutral_surface(surf);
blit_surface(surf, &src_clip, canvas, &dst_clip);
}
-
-
//! Definition of a text shape.
class ttext : public tcanvas::tshape
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits