- Added BackgroundMode=4 for tiling background image.

- Added tinting functions for Background.
- Added "ImageCrop" option to Meter=IMAGE/BAR/HISTOGRAM/ROTATOR and Background.
- Added "Tile" option to Meter=IMAGE.
- Some code cleanups.
This commit is contained in:
spx
2010-12-04 15:07:28 +00:00
parent 19294c4339
commit 96c81ac516
13 changed files with 395 additions and 200 deletions

View File

@ -33,8 +33,8 @@ public:
bool IsLoaded() { return (m_Bitmap != NULL); }
bool IsTinted() { return (m_BitmapTint != NULL); }
bool IsConfigsChanged() { return m_NeedsTinting || m_NeedsTransform; }
void ClearConfigFlags() { m_NeedsTinting = m_NeedsTransform = false; }
bool IsConfigsChanged() { return m_NeedsCrop || m_NeedsTinting || m_NeedsTransform; }
void ClearConfigFlags() { m_NeedsCrop = m_NeedsTinting = m_NeedsTransform = false; }
Gdiplus::Bitmap* GetOriginalImage() { return m_Bitmap; }
Gdiplus::Bitmap* GetTintedImage() { return m_BitmapTint; }
@ -44,6 +44,7 @@ public:
void LoadImage(const std::wstring& imageName, bool bLoadAlways);
protected:
void ApplyCrop();
void ApplyTint();
void ApplyTransform();
@ -57,6 +58,7 @@ protected:
FILETIME m_Modified;
std::wstring m_ConfigName;
std::wstring m_ConfigImageCrop;
std::wstring m_ConfigGreyscale;
std::wstring m_ConfigImageTint;
std::wstring m_ConfigImageAlpha;
@ -70,9 +72,11 @@ protected:
const bool m_DisableTransform;
bool m_NeedsCrop;
bool m_NeedsTinting;
bool m_NeedsTransform;
Gdiplus::Rect m_Crop;
bool m_GreyScale;
Gdiplus::ColorMatrix m_ColorMatrix;
Gdiplus::RotateFlipType m_Flip;