예제 #1
0
파일: main.cpp 프로젝트: knyazsergei/OOP
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);
		}
	}
}
예제 #2
0
파일: main.cpp 프로젝트: Lokdemok/OOP
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);
		}
	}
}
예제 #3
0
파일: Canvas.cpp 프로젝트: licar/lab3
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);
		}
	}
}