This topic shows you how to use CBitmapContext::Clear() to clear a rectangle to the current brush color.
TRect largeBox(0,0,100,100);
TRect clearBox(20,20,40,40);
// draw a cross-hatched box
gc.SetBrushColor(KRgbDarkGray);
gc.SetBrushStyle(CGraphicsContext::ESquareCrossHatchBrush);
gc.DrawRect(largeBox);
// clear a small rectangle
gc.SetBrushColor(KRgbGray); // change the brush color
gc.Clear(clearBox); // clear to brush color
Note : When clearing a rectangle, the brush style is ignored, even if it is TBrushStyle::ENullBrush .
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.