Exemple #1
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);
		}
	}
}
Exemple #2
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);
		}
	}
}
Exemple #3
0
void FillRectangle(CRectangle const &rect,
	char code, CCanvas &canvas)
{
	for (size_t y = rect.GetTop(); y != (size_t)rect.GetBottom(); ++y)
	{
		for (size_t x = rect.GetLeft(); x != (size_t)rect.GetRight(); ++x)
		{
			canvas.SetPixel(x, y, code);
		}
	}
}