using Quik.Typography;
namespace Quik
{
///
/// An object which QUIK commands may be issued to.
///
public class QuikContext
{
///
/// Draw queue.
///
public QuikDraw Draw { get; } = new QuikDraw();
///
/// The object responsible for managing textures.
///
public IQuikTextureManager TextureManager { get; }
///
/// The object responsible for managing fonts.
///
public IQuikFontManager FontManager { get; }
public QuikStrokeStyle DefaultStroke { get; set; } = new QuikStrokeStyle(new QuikColor(0xaaaaaaff), 4);
public QuikFillStyle DefaultFill { get; set; } = new QuikFillStyle()
{
Color = new QuikColor(0xeeeeeeff)
};
public QuikFont DefaultFont { get; set; }
public QuikContext(IQuikTextureManager textureManager, IQuikFontManager fontManager)
{
TextureManager = textureManager;
FontManager = fontManager;
TextureManager.Context = FontManager.Context = this;
}
///
/// Clear the context.
///
public void Clear()
{
Draw.Clear();
TextureManager.Clear();
FontManager.Clear();
}
}
}