mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -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:
@@ -30,11 +30,7 @@ AlphaMask::~AlphaMask() {
|
||||
}
|
||||
|
||||
void AlphaMask::setAlpha(Image& img) const {
|
||||
if (img.GetWidth() != size.GetWidth() || img.GetHeight() != size.GetHeight()) {
|
||||
throw InternalError(_("Image used with maks must have same size as mask"));
|
||||
}
|
||||
if (!img.HasAlpha()) img.InitAlpha();
|
||||
memcpy(img.GetAlpha(), alpha, size.GetWidth() * size.GetHeight());
|
||||
set_alpha(img, alpha, size);
|
||||
}
|
||||
|
||||
void AlphaMask::setAlpha(Bitmap& bmp) const {
|
||||
|
||||
Reference in New Issue
Block a user