// COECCNTX.CPP
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

#include <coeccntx.h>

EXPORT_C void MCoeControlContext::ActivateContext(CWindowGc& aGc,RDrawableWindow& aWindow) const
	{
	aGc.Activate(aWindow);
	PrepareContext(aGc);
	}

EXPORT_C void MCoeControlContext::ResetContext(CWindowGc& aGc) const
	{
	aGc.Reset();
	PrepareContext(aGc);
	}

EXPORT_C void MCoeControlContext::PrepareContext(CWindowGc& /*aGc*/) const
	{
	}

EXPORT_C void MCoeControlBrushContext::PrepareContext(CWindowGc& aGc) const
	{
	if (iBitmap)
		{
		aGc.UseBrushPattern(iBitmap);
		aGc.SetBrushStyle(CGraphicsContext::EPatternedBrush);
		return;
		}
	aGc.SetBrushStyle(iBrushStyle);
	aGc.SetBrushColor(iBrushColor);
	}
