mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
convert to CRLF line endings
This commit is contained in:
+12
-12
@@ -106,11 +106,11 @@ void CachedScriptableImage::generateCached(const GeneratedImage::Options& option
|
||||
*size = cached_size;
|
||||
// do the options match?
|
||||
Radians relative_rotation = options.angle + rad360 - cached_options_angle;
|
||||
bool ok = almost_equal(cached_options_size.width, options.width) &&
|
||||
almost_equal(cached_options_size.height, options.height) &&
|
||||
almost_equal(cached_options_zoom, options.zoom) &&
|
||||
cached_options_preserve_aspect == options.preserve_aspect &&
|
||||
cached_options_saturate == options.saturate &&
|
||||
bool ok = almost_equal(cached_options_size.width, options.width) &&
|
||||
almost_equal(cached_options_size.height, options.height) &&
|
||||
almost_equal(cached_options_zoom, options.zoom) &&
|
||||
cached_options_preserve_aspect == options.preserve_aspect &&
|
||||
cached_options_saturate == options.saturate &&
|
||||
is_straight(relative_rotation); // we only need an {0,90,180,270} degree rotation compared to the cached one, this doesn't reduce image quality
|
||||
// image or bitmap?
|
||||
if (*combine <= COMBINE_NORMAL) {
|
||||
@@ -131,19 +131,19 @@ void CachedScriptableImage::generateCached(const GeneratedImage::Options& option
|
||||
*image = cached_i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// store the options as they were asked for
|
||||
cached_options_size = RealSize(options.width, options.height);
|
||||
cached_options_zoom = options.zoom;
|
||||
cached_options_preserve_aspect = options.preserve_aspect;
|
||||
cached_options_saturate = options.saturate;
|
||||
}
|
||||
// store the options as they were asked for
|
||||
cached_options_size = RealSize(options.width, options.height);
|
||||
cached_options_zoom = options.zoom;
|
||||
cached_options_preserve_aspect = options.preserve_aspect;
|
||||
cached_options_saturate = options.saturate;
|
||||
cached_options_angle = options.angle;
|
||||
// hack(part1): temporarily set angle to 0, do actual rotation after applying mask
|
||||
const_cast<GeneratedImage::Options&>(options).angle = 0;
|
||||
// generate
|
||||
cached_i = generate(options);
|
||||
assert(cached_i.Ok());
|
||||
const_cast<GeneratedImage::Options&>(options).angle = cached_options_angle;
|
||||
const_cast<GeneratedImage::Options&>(options).angle = cached_options_angle;
|
||||
// store the size as it actually is (may have been changed by conform_image() when we generated the image)
|
||||
*size = cached_size = RealSize(options.width, options.height);
|
||||
if (mask) {
|
||||
|
||||
Reference in New Issue
Block a user