title says all
namespace Quester.Classes
{
public static class Graphics
{
private static Game Game;
private static GraphicsDeviceManager Device;
private static SpriteBatch SpriteBatch;
public static void Init(Game game)
{
Game = game;
Device = new GraphicsDeviceManager(Game);
SpriteBatch = new SpriteBatch(Game.GraphicsDevice);
Game.Content.RootDirectory = "Content";
}
public static Image NewImage(int width, int height)
{
return new Image(Game.GraphicsDevice, width, height);
}
public static void SetClip(int x, int y, int w, int h)
{
Game.GraphicsDevice.ScissorRectangle = new Rectangle(x, y, w, h);
}
public static void SetClip()
{
Game.GraphicsDevice.ScissorRectangle = ???
}
public static void Rect(Color color, int x1, int y1, int x2, int y2, int thickness)
{
SpriteBatch.DrawRectangle(new RectangleF(x1, y1, x2 - x1, y2 - y1), color, thickness);
}
public static void Line(Color color, int x1, int y1, int x2, int y2, int thickness)
{
SpriteBatch.DrawLine(x1, y1, x2, y2, color, thickness);
}
public static void Dot (Color color, int x1, int y1, int thickness)
{
SpriteBatch.DrawPoint(x1, y1, color, thickness);
}
}
}