mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed the problem that the BarImage disappears if "DynamicVariables=1" is set in BAR meter.
Added the new image tinting / transforming function in IMAGE meter. (ImageTint, GreyScale, ColorMatrix(1-5), ImageFlip, ImageRotate)
This commit is contained in:
@ -41,17 +41,31 @@ public:
|
||||
|
||||
private:
|
||||
void LoadImage(bool bLoadAlways);
|
||||
bool CompareColorMatrix(const Gdiplus::ColorMatrix& a, const Gdiplus::ColorMatrix& b);
|
||||
void ApplyTint();
|
||||
Gdiplus::Bitmap* TurnGreyscale();
|
||||
void ApplyTransform();
|
||||
|
||||
Gdiplus::Bitmap* m_Bitmap; // The bitmap
|
||||
Gdiplus::Bitmap* m_BitmapTint; // The bitmap
|
||||
std::wstring m_ImageName; // Name of the image
|
||||
std::wstring m_Path;
|
||||
bool m_NeedsUpdate;
|
||||
bool m_NeedsReload;
|
||||
bool m_NeedsTinting;
|
||||
bool m_NeedsTransform;
|
||||
bool m_WidthDefined;
|
||||
bool m_HeightDefined;
|
||||
bool m_PreserveAspectRatio; // If true, aspect ratio of the image is preserved when the image is scaled
|
||||
int m_ImageAlpha; // Transparency value 0 - 255
|
||||
HGLOBAL m_hBuffer;
|
||||
FILETIME m_Modified;
|
||||
|
||||
bool m_GreyScale;
|
||||
Gdiplus::ColorMatrix m_ColorMatrix;
|
||||
Gdiplus::RotateFlipType m_Flip;
|
||||
Gdiplus::REAL m_Rotate;
|
||||
|
||||
static const Gdiplus::ColorMatrix c_GreyScaleMatrix;
|
||||
static const Gdiplus::ColorMatrix c_IdentifyMatrix;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user