Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to clear a rectangle

You can use the CBitmapContext::Clear() to clear a rectangle to the current brush colour:

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