Added image manipulation codes to Meter=BITMAP/BUTTON/HISTOGRAM and refactored them.

For BITMAP/BUTTON:
- Greyscale
- ImageTint
- ImageAlpha
- ColorMatrixN
- ImageFlip
Note: BITMAP and BUTTON are not able to support ImageRotate.

For HISTOGRAM:
- PrimaryGreyscale
- PrimaryImageTint
- PrimaryImageAlpha
- PrimaryColorMatrixN
- PrimaryImageFlip
- PrimaryImageRotate
- Secondary***
- Both***
This commit is contained in:
spx
2010-11-27 19:53:23 +00:00
parent 674cebda64
commit a0ae80cd04
15 changed files with 967 additions and 753 deletions

View File

@ -20,6 +20,7 @@
#define __METERBUTTON_H__
#include "Meter.h"
#include "TintedImage.h"
#include "MeterWindow.h"
#define BUTTON_FRAMES 3
@ -46,9 +47,11 @@ public:
private:
bool HitTest2(int px, int py, bool checkAlpha);
Gdiplus::Bitmap* m_Bitmap; // The bitmap
Gdiplus::CachedBitmap* m_Bitmaps[BUTTON_FRAMES]; // The cached bitmaps
CTintedImage m_Image;
std::wstring m_ImageName; // Name of the image
bool m_NeedsReload;
Gdiplus::CachedBitmap* m_Bitmaps[BUTTON_FRAMES]; // The cached bitmaps
std::wstring m_Command; // Command to be executed
int m_State;
bool m_Clicked;