Esempio n. 1
0
void Image::OnDraw(Graphics& graphics, Position offset)
{
	if (image == NULL)
		return;

	// FIXME Move rect calculation into the base class??
	SDL_Rect r;
	r.x = absolutePosition.x + offset.x;
	r.y = absolutePosition.y + offset.y;
	r.w = calculatedSize.w;
	r.h = calculatedSize.h;
	graphics.DrawTexture(&r, image);
}