Subversion Repositories Kolibri OS

Rev

Rev 5281 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5281 Rev 5296
Line 20... Line 20...
20
	kos_PutImage((RGB*)this->buffer, this->width, this->height, position.X, position.Y);
20
	kos_PutImage((RGB*)this->buffer, this->width, this->height, position.X, position.Y);
21
}
21
}
Line 22... Line 22...
22
 
22
 
23
void CKosRender::RenderImg(RGB *img, Point position, int width, int height)
23
void CKosRender::RenderImg(RGB *img, Point position, int width, int height)
24
{
24
{
25
	for (int i = 0; i < width * height; i++)
25
	for (int y = position.Y; y < position.Y + height; y++)
26
		this->buffer[i] = img[i];
26
		for (int x = position.X; x < position.X + width; x++)
27
		//	if ( )
27
			if (x >= 0 && y >= 0 && x < this->width && y < this->height)
28
		//		this->buffer[getPixel(x, y)]
28
				this->buffer[y * width + x] = img[(y - position.Y) * width + (x - position.X)];
Line 29... Line 29...
29
}
29
}
30
 
30
 
31
int CKosRender::getPixel(int x, int y)
31
int CKosRender::getPixel(int x, int y)