Change to use Gfx rendering

This commit is contained in:
Birunthan Mohanathas
2013-03-25 17:42:18 +02:00
parent 82970d1cce
commit ef1cf223a7
22 changed files with 226 additions and 582 deletions

View File

@ -22,6 +22,7 @@
#include "Error.h"
#include "Litestep.h"
#include "Rainmeter.h"
#include "../Common/Gfx/Canvas.h"
using namespace Gdiplus;
@ -145,9 +146,11 @@ bool CMeterRotator::Update()
** Draws the meter on the double buffer
**
*/
bool CMeterRotator::Draw(Graphics& graphics)
bool CMeterRotator::Draw(Gfx::Canvas& canvas)
{
if (!CMeter::Draw(graphics)) return false;
if (!CMeter::Draw(canvas)) return false;
Gdiplus::Graphics& graphics = canvas.BeginGdiplusContext();
if (m_Image.IsLoaded())
{
@ -176,5 +179,7 @@ bool CMeterRotator::Draw(Graphics& graphics)
graphics.ResetTransform();
}
canvas.EndGdiplusContext();
return true;
}