mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
AlphaMask combines alphas instead of overwriting
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@772 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -126,6 +126,10 @@ void resample(const Image& img_in, Image& img_out) {
|
||||
}
|
||||
|
||||
void resample_and_clip(const Image& img_in, Image& img_out, wxRect rect) {
|
||||
// mask to alpha
|
||||
if (img_in.HasMask() && !img_in.HasAlpha()) {
|
||||
const_cast<Image&>(img_in).InitAlpha();
|
||||
}
|
||||
// starting position in data
|
||||
int offset_in = (rect.x + img_in.GetWidth() * rect.y);
|
||||
if (img_out.GetHeight() == rect.height) {
|
||||
|
||||
Reference in New Issue
Block a user