mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Tweaks. (Uses CachedBitmap if image scaling isn't needed.)
This commit is contained in:
parent
01b3c31477
commit
68bc25ee82
@ -246,7 +246,16 @@ bool CMeterImage::Draw(Graphics& graphics)
|
||||
int drawW = m_W;
|
||||
int drawH = m_H;
|
||||
|
||||
if (m_Tile)
|
||||
GUID guid;
|
||||
if (drawW == imageW && drawH == imageH &&
|
||||
m_ScaleMargins.left == 0 && m_ScaleMargins.top == 0 && m_ScaleMargins.right == 0 && m_ScaleMargins.bottom == 0 &&
|
||||
GetTransformationMatrix().IsIdentity() &&
|
||||
Ok == drawBitmap->GetRawFormat(&guid) && guid != ImageFormatMemoryBMP)
|
||||
{
|
||||
CachedBitmap cache(drawBitmap, &graphics);
|
||||
graphics.DrawCachedBitmap(&cache, x, y);
|
||||
}
|
||||
else if (m_Tile)
|
||||
{
|
||||
ImageAttributes imgAttr;
|
||||
imgAttr.SetWrapMode(WrapModeTile);
|
||||
|
Loading…
Reference in New Issue
Block a user