KumiScript/renderer/Background.cs

44 lines
813 B
C#
Raw Normal View History

2024-01-26 05:37:51 +00:00
using SDL2;
namespace KumiScript.Renderer
{
public class Background : IDrawable
{
SDLRenderer _renderer;
Image _image;
int _height;
int _width;
public Background(string path, SDLRenderer renderer)
{
_renderer = renderer;
_image = new Image(path, renderer);
}
public void Draw(int x, int y)
{
SDL.SDL_RenderCopy(_renderer.id, _image.GetTexture().id, 0, 0);
}
public int GetBitmapHeight()
{
return _height;
}
public int GetBitmapWidth()
{
return _width;
}
public int GetXOffset()
{
return 0;
}
public int GetYOffset()
{
return 0;
}
}
}