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:
twanvl
2007-12-20 19:40:35 +00:00
parent 306b996ee0
commit 125dbe53af
4 changed files with 25 additions and 5 deletions
+4
View File
@@ -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) {