Added functions for blurring and scaling images and changing the alpha value

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@494 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-05 21:58:09 +00:00
parent d7898faa8c
commit 801dc3db39
12 changed files with 360 additions and 15 deletions
+4 -1
View File
@@ -42,7 +42,10 @@ GeneratedImageP image_from_script(const ScriptValueP& value) {
// ----------------------------------------------------------------------------- : ScriptableImage
Image ScriptableImage::generate(const GeneratedImage::Options& options, bool cache) const {
if (cached.Ok() && cached.GetWidth() == options.width && cached.GetHeight() == options.height) {
if (cached.Ok() && (cached.GetWidth() == options.width && cached.GetHeight() == options.height
|| (options.preserve_aspect == ASPECT_FIT && // only one dimension has to fit
(cached.GetWidth() == options.width || cached.GetHeight() == options.height)
))) {
// cached, so we are done
return cached;
}