diff --git a/mythtv/libs/libmythui/mythuiimage.cpp b/mythtv/libs/libmythui/mythuiimage.cpp
index 5674bf1..d6ac47b 100644
a
|
b
|
class ImageLoader |
306 | 306 | |
307 | 307 | if (imProps.isMasked) |
308 | 308 | { |
| 309 | MythImage *newMaskImage = painter->GetFormatImage(); |
| 310 | if (newMaskImage->Load(imProps.GetMaskImageFilename())) |
| 311 | imProps.SetMaskImage(newMaskImage); |
| 312 | else |
| 313 | imProps.SetMaskImage(NULL); |
| 314 | newMaskImage->DecrRef(); |
| 315 | |
| 316 | if (imProps.isMasked) |
| 317 | { |
309 | 318 | QRect imageArea = image->rect(); |
310 | 319 | QRect maskArea = imProps.GetMaskImageRect(); |
311 | 320 | |
… |
… |
class ImageLoader |
325 | 334 | QImage mask = imProps.GetMaskImageSubset(imageArea); |
326 | 335 | image->setAlphaChannel(mask.alphaChannel()); |
327 | 336 | } |
| 337 | } |
328 | 338 | |
329 | 339 | if (imProps.isReflected) |
330 | 340 | image->Reflect(imProps.reflectAxis, imProps.reflectShear, |
… |
… |
bool MythUIImage::ParseElement( |
1363 | 1373 | } |
1364 | 1374 | else if (element.tagName() == "mask") |
1365 | 1375 | { |
1366 | | QString maskfile = getFirstText(element); |
1367 | | |
1368 | | MythImage *newMaskImage = GetPainter()->GetFormatImage(); |
1369 | | if (newMaskImage->Load(maskfile)) |
1370 | | m_imageProperties.SetMaskImage(newMaskImage); |
1371 | | else |
1372 | | m_imageProperties.SetMaskImage(NULL); |
1373 | | newMaskImage->DecrRef(); |
| 1376 | m_imageProperties.SetMaskImageFilename(getFirstText(element)); |
| 1377 | m_imageProperties.isMasked = true; |
1374 | 1378 | } |
1375 | 1379 | else if (element.tagName() == "grayscale" || |
1376 | 1380 | element.tagName() == "greyscale") |
diff --git a/mythtv/libs/libmythui/mythuiimage.h b/mythtv/libs/libmythui/mythuiimage.h
index a90ee3f..85abb65 100644
a
|
b
|
class ImageProperties |
30 | 30 | ImageProperties &operator=(const ImageProperties &other); |
31 | 31 | |
32 | 32 | void SetMaskImage(MythImage *image); |
| 33 | void SetMaskImageFilename(const QString &filename) |
| 34 | { |
| 35 | maskImageFilename=filename; |
| 36 | } |
| 37 | QString GetMaskImageFilename() |
| 38 | { |
| 39 | return maskImageFilename; |
| 40 | } |
33 | 41 | QRect GetMaskImageRect(void) |
34 | 42 | { |
35 | 43 | QRect rect; |
… |
… |
class ImageProperties |
68 | 76 | void Copy(const ImageProperties &other); |
69 | 77 | |
70 | 78 | MythImage *maskImage; |
| 79 | QString maskImageFilename; |
71 | 80 | }; |
72 | 81 | |
73 | 82 | typedef QPair<MythImage *, int> AnimationFrame; |