mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
debuged some horrible race conditions & deadlocks
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@160 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -144,6 +144,8 @@ void resample_and_clip(const Image& img_in, Image& img_out, wxRect rect) {
|
||||
// fill an image with 100% transparent, except for the given rectangle
|
||||
void fill_transparent(Image& img, int dx, int dy, int w, int h) {
|
||||
if (!img.HasAlpha()) img.InitAlpha();
|
||||
memset(img.GetAlpha(), 0, img.GetWidth() * img.GetHeight());
|
||||
/*/?
|
||||
int iw = img.GetWidth(), ih = img.GetHeight();
|
||||
Byte* data = img.GetAlpha();
|
||||
// fill
|
||||
@@ -160,6 +162,7 @@ void fill_transparent(Image& img, int dx, int dy, int w, int h) {
|
||||
for (; y < ih ; ++y) {
|
||||
for (int x = 0 ; x < iw ; ++x) *data++ = 0;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void resample_preserve_aspect(const Image& img_in, Image& img_out) {
|
||||
|
||||
Reference in New Issue
Block a user