mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user