Rename a few files and classes.

This commit is contained in:
H. Utku Maden 2024-07-28 12:21:18 +03:00
parent 3f1875252e
commit 468648de95
6 changed files with 12 additions and 12 deletions

@ -10,9 +10,9 @@ using Dashboard.Typography;
namespace Dashboard
{
/// <summary>
/// Main class for Quik applications.
/// Main class for Dashboard applications.
/// </summary>
public class DashboardApplication
public class DbApplication
{
/// <summary>
/// The application platform driver.
@ -46,7 +46,7 @@ namespace Dashboard
/// </summary>
public List<MediaLoader> MediaLoaders { get; } = new List<MediaLoader>();
public DashboardApplication(IDashboardPlatform platform)
public DbApplication(IDashboardPlatform platform)
{
Platform = platform;
FontProvider = new FontProvider(this);
@ -123,9 +123,9 @@ namespace Dashboard
return true;
}
public static DashboardApplication Current { get; private set; } = null!;
public static DbApplication Current { get; private set; } = null!;
public static void SetCurrentApplication(DashboardApplication application)
public static void SetCurrentApplication(DbApplication application)
{
Current = application;
}

@ -59,14 +59,14 @@ namespace Dashboard.Media
{
Size = size;
DashboardApplication.Current.Platform.GetMaximumImage(out int height, out int width);
DbApplication.Current.Platform.GetMaximumImage(out int height, out int width);
// Do no allow to create a texture that is greater than 16 square characters at 200 DPI.
width = Math.Min(width, (int)(size * 200 * 16));
height = Math.Min(height, (int)(size * 200 * 16));
// width = height = 256;
atlas = new FontAtlas(width, height, DashboardApplication.Current.FontProvider.RasterizerOptions.Sdf);
atlas = new FontAtlas(width, height, DbApplication.Current.FontProvider.RasterizerOptions.Sdf);
}
public void Get(int codepoint, out FontGlyph glyph, QFont font)
@ -78,7 +78,7 @@ namespace Dashboard.Media
out QGlyphMetrics metrics,
codepoint,
Size,
DashboardApplication.Current.FontProvider.RasterizerOptions);
DbApplication.Current.FontProvider.RasterizerOptions);
if (image != null)
{

@ -18,7 +18,7 @@ namespace Dashboard.Typography
public readonly FontRasterizerOptions RasterizerOptions;
public IFontDataBase? Database { get; set; }
public IFontFactory? FontFactory { get; set; }
private readonly DashboardApplication App;
private readonly DbApplication App;
public QFont this[FontFace info]
{
@ -51,7 +51,7 @@ namespace Dashboard.Typography
}
}
public FontProvider(DashboardApplication app, in FontRasterizerOptions options)
public FontProvider(DbApplication app, in FontRasterizerOptions options)
{
RasterizerOptions = options;
App = app;
@ -73,7 +73,7 @@ namespace Dashboard.Typography
FontFactory = (IFontFactory?)ctor?.Invoke(null);
}
}
public FontProvider(DashboardApplication app)
public FontProvider(DbApplication app)
: this(app, FontRasterizerOptions.Default)
{
}

@ -12,7 +12,7 @@ namespace Dashboard.Demo
{
public static class Program
{
public static readonly DashboardApplication Application = new DashboardApplication(new OpenTKPlatform());
public static readonly DbApplication Application = new DbApplication(new OpenTKPlatform());
public static void Main(string[] args)
{