Example #1
0
void FillRectangle(CRectangle & rect, char symForDraw, CCanvas & canvas)
{
	for (int x = rect.GetPos().x; x < rect.GetPos().x + rect.GetSize().x; x++)
	{
		for (int y = rect.GetPos().y; y < rect.GetSize().y + rect.GetPos().y; y++)
		{
			canvas.SetPixel(y, x, symForDraw);
		}
	}
}
Example #2
0
void FillRectangle(CRectangle & rect, char code, CCanvas & canvas)
{
	for (int x = rect.GetPosition().x; x < rect.GetPosition().x + rect.GetSize().x; ++x)
	{
		for (int y = rect.GetPosition().y; y < rect.GetPosition().y + rect.GetSize().y; ++y)
		{
			canvas.SetPixel(x, y, code);
		}
	}
}