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

@ -20,6 +20,7 @@
#include "MeterRoundLine.h"
#include "Measure.h"
#include "Error.h"
#include "../Common/Gfx/Canvas.h"
using namespace Gdiplus;
@ -116,9 +117,11 @@ bool CMeterRoundLine::Update()
** Draws the meter on the double buffer
**
*/
bool CMeterRoundLine::Draw(Graphics& graphics)
bool CMeterRoundLine::Draw(Gfx::Canvas& canvas)
{
if (!CMeter::Draw(graphics)) return false;
if (!CMeter::Draw(canvas)) return false;
Gdiplus::Graphics& graphics = canvas.BeginGdiplusContext();
// Calculate the center of for the line
int x = GetX();
@ -164,6 +167,8 @@ bool CMeterRoundLine::Draw(Graphics& graphics)
graphics.DrawLine(&pen, sx, sy, ex, ey);
}
canvas.EndGdiplusContext();
return true;
}