diff --git a/Dashboard.BlurgText/DashboardBlurg.cs b/Dashboard.BlurgText/DashboardBlurg.cs
index 314b3b0..c4128a2 100644
--- a/Dashboard.BlurgText/DashboardBlurg.cs
+++ b/Dashboard.BlurgText/DashboardBlurg.cs
@@ -20,7 +20,7 @@ namespace Dashboard.BlurgText
private nint TextureAllocationCallback(int width, int height)
{
- QImageBuffer image = new QImageBuffer(QImageFormat.RgbaU8, width, height);
+ QImageBuffer image = new QImageBuffer(ImageFormat.RgbaU8, width, height);
images.Add(image);
return images.Count - 1;
}
@@ -30,7 +30,7 @@ namespace Dashboard.BlurgText
if (width == 0 || height == 0)
return;
- QImageLock src = new QImageLock(QImageFormat.RgbaU8, width, height, 1, buffer);
+ QImageLock src = new QImageLock(ImageFormat.RgbaU8, width, height, 1, buffer);
QImageBuffer image = images[(int)userData];
image.LockBits2d(out QImageLock dest, QImageLockOptions.Default);
diff --git a/Dashboard.Media.Defaults/Fallback/FallbackFontDatabase.cs b/Dashboard.Media.Defaults/Fallback/FallbackFontDatabase.cs
index f03b9dd..5ed430a 100644
--- a/Dashboard.Media.Defaults/Fallback/FallbackFontDatabase.cs
+++ b/Dashboard.Media.Defaults/Fallback/FallbackFontDatabase.cs
@@ -5,7 +5,7 @@ using System.Linq;
using System.Text.Json.Serialization;
using System.Text.Json;
using ReFuel.FreeType;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using Dashboard.PAL;
using Dashboard.Media.Defaults.Linux;
diff --git a/Dashboard.Media.Defaults/FontDatabaseProvider.cs b/Dashboard.Media.Defaults/FontDatabaseProvider.cs
index 0263435..af0a6ca 100644
--- a/Dashboard.Media.Defaults/FontDatabaseProvider.cs
+++ b/Dashboard.Media.Defaults/FontDatabaseProvider.cs
@@ -6,7 +6,7 @@ using System.Text;
using ReFuel.FreeType;
using Dashboard.Media.Defaults.Fallback;
using Dashboard.Media.Defaults.Linux;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using Dashboard.PAL;
namespace Dashboard.Media.Defaults
diff --git a/Dashboard.Media.Defaults/QFontFreeType.cs b/Dashboard.Media.Defaults/FontFreeType.cs
similarity index 85%
rename from Dashboard.Media.Defaults/QFontFreeType.cs
rename to Dashboard.Media.Defaults/FontFreeType.cs
index 53a1d16..2ccb5b1 100644
--- a/Dashboard.Media.Defaults/QFontFreeType.cs
+++ b/Dashboard.Media.Defaults/FontFreeType.cs
@@ -3,19 +3,19 @@ using System.Buffers;
using System.IO;
using ReFuel.FreeType;
using Dashboard.Media.Color;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using OpenTK.Mathematics;
namespace Dashboard.Media.Defaults
{
- public class QFontFreeType : QFont
+ public class FontFreeType : Font
{
private MemoryStream ms;
private FTFace face;
public override FontFace Face => throw new NotImplementedException();
- public QFontFreeType(Stream stream)
+ public FontFreeType(Stream stream)
{
ms = new MemoryStream();
stream.CopyTo(ms);
@@ -32,7 +32,7 @@ namespace Dashboard.Media.Defaults
return FT.GetCharIndex(face, (ulong)rune) != 0;
}
- protected override QImage Render(out QGlyphMetrics metrics, int codepoint, float size, in FontRasterizerOptions options)
+ protected override Image Render(out GlyphMetrics metrics, int codepoint, float size, in FontRasterizerOptions options)
{
FT.SetCharSize(face, 0, (long)Math.Round(64*size), 0, (uint)Math.Round(options.Resolution));
@@ -40,7 +40,7 @@ namespace Dashboard.Media.Defaults
FT.LoadGlyph(face, index, FTLoadFlags.Default);
ref readonly FTGlyphMetrics ftmetrics = ref face.Glyph.Metrics;
- metrics = new QGlyphMetrics(codepoint,
+ metrics = new GlyphMetrics(codepoint,
new Vector2(ftmetrics.Width/64f, ftmetrics.Height/64f),
new Vector2(ftmetrics.HorizontalBearingX/64f, ftmetrics.HorizontalBearingY/64f),
new Vector2(ftmetrics.VerticalBearingX/64f, ftmetrics.VerticalBearingY/64f),
@@ -55,7 +55,7 @@ namespace Dashboard.Media.Defaults
return null;
}
- QImageBuffer image = new QImageBuffer(QImageFormat.AlphaU8, (int)bitmap.Width, (int)bitmap.Rows);
+ QImageBuffer image = new QImageBuffer(ImageFormat.AlphaU8, (int)bitmap.Width, (int)bitmap.Rows);
image.LockBits2d(out QImageLock lk, QImageLockOptions.Default);
unsafe
diff --git a/Dashboard.Media.Defaults/FreeTypeFontFactory.cs b/Dashboard.Media.Defaults/FreeTypeFontFactory.cs
index c0a9bdf..0876c49 100644
--- a/Dashboard.Media.Defaults/FreeTypeFontFactory.cs
+++ b/Dashboard.Media.Defaults/FreeTypeFontFactory.cs
@@ -7,11 +7,11 @@ namespace Dashboard.Media.Defaults
{
public class FreeTypeFontFactory : IFontFactory
{
- public bool TryOpen(Stream stream, [NotNullWhen(true)] out QFont font)
+ public bool TryOpen(Stream stream, [NotNullWhen(true)] out Font font)
{
try
{
- font = new QFontFreeType(stream);
+ font = new FontFreeType(stream);
return true;
}
catch
diff --git a/Dashboard.Media.Defaults/QImageStbi.cs b/Dashboard.Media.Defaults/ImageStbi.cs
similarity index 80%
rename from Dashboard.Media.Defaults/QImageStbi.cs
rename to Dashboard.Media.Defaults/ImageStbi.cs
index 2852e44..4598ca7 100644
--- a/Dashboard.Media.Defaults/QImageStbi.cs
+++ b/Dashboard.Media.Defaults/ImageStbi.cs
@@ -5,7 +5,7 @@ using ReFuel.Stb;
namespace Dashboard.Media.Defaults
{
- public unsafe class QImageStbi : QImage
+ public unsafe class ImageStbi : Image
{
private readonly StbImage image;
private QImageBuffer buffer;
@@ -17,9 +17,9 @@ namespace Dashboard.Media.Defaults
public override int Depth => 1;
public override bool IsSdf => isSdf;
- public override QImageFormat InternalFormat => Stb2QImageFormat(image.Format);
+ public override ImageFormat InternalFormat => Stb2QImageFormat(image.Format);
- public QImageStbi(Stream source)
+ public ImageStbi(Stream source)
{
// According to the stbi documentation, only a specific type of PNG
// files are premultiplied out of the box (iPhone PNG). Take the
@@ -30,15 +30,15 @@ namespace Dashboard.Media.Defaults
image = StbImage.Load(source);
}
- public static QImageFormat Stb2QImageFormat(StbiImageFormat src)
+ public static ImageFormat Stb2QImageFormat(StbiImageFormat src)
{
switch (src)
{
- case StbiImageFormat.Grey: return QImageFormat.RedU8;
- case StbiImageFormat.Rgb: return QImageFormat.RgbU8;
- case StbiImageFormat.Rgba: return QImageFormat.RgbaU8;
- case StbiImageFormat.GreyAlpha: return QImageFormat.RaU8;
- default: return QImageFormat.Undefined;
+ case StbiImageFormat.Grey: return ImageFormat.RedU8;
+ case StbiImageFormat.Rgb: return ImageFormat.RgbU8;
+ case StbiImageFormat.Rgba: return ImageFormat.RgbaU8;
+ case StbiImageFormat.GreyAlpha: return ImageFormat.RaU8;
+ default: return ImageFormat.Undefined;
}
}
diff --git a/Dashboard.Media.Defaults/Linux/FontConfigFontDatabase.cs b/Dashboard.Media.Defaults/Linux/FontConfigFontDatabase.cs
index f48b420..e8bf9b0 100644
--- a/Dashboard.Media.Defaults/Linux/FontConfigFontDatabase.cs
+++ b/Dashboard.Media.Defaults/Linux/FontConfigFontDatabase.cs
@@ -6,7 +6,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using ReFuel.FreeType;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using Dashboard.PAL;
namespace Dashboard.Media.Defaults.Linux
diff --git a/Dashboard.Media.Defaults/StbMediaLoader.cs b/Dashboard.Media.Defaults/StbMediaLoader.cs
index db30348..83e2b0e 100644
--- a/Dashboard.Media.Defaults/StbMediaLoader.cs
+++ b/Dashboard.Media.Defaults/StbMediaLoader.cs
@@ -4,7 +4,7 @@ using System.Collections;
using System.IO;
using System.Linq;
using System.Net;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
// WebRequest is obsolete but runs on .NET framework.
#pragma warning disable SYSLIB0014
diff --git a/Dashboard.OpenTK/OpenTKPlatform.cs b/Dashboard.OpenTK/OpenTKPlatform.cs
index faaabfb..5eb7b8f 100644
--- a/Dashboard.OpenTK/OpenTKPlatform.cs
+++ b/Dashboard.OpenTK/OpenTKPlatform.cs
@@ -16,7 +16,7 @@ namespace Dashboard.OpenTK
// These shall remain a sad nop for now.
public string? Title { get; set; }
- public QImage? Icon { get; set; } = null;
+ public Media.Image? Icon { get; set; } = null;
public event EventHandler? EventRaised;
diff --git a/Dashboard/Controls/Label.cs b/Dashboard/Controls/Label.cs
index 936660c..5b5f566 100644
--- a/Dashboard/Controls/Label.cs
+++ b/Dashboard/Controls/Label.cs
@@ -8,7 +8,7 @@ namespace Dashboard.Controls
public class Label : Control
{
public string Text { get; set; } = string.Empty;
- public QFont? Font { get; set; }
+ public Font? Font { get; set; }
public float TextSize { get; set; }
public bool AutoSize { get; set; } = true;
diff --git a/Dashboard/DbApplication.cs b/Dashboard/DbApplication.cs
index 4356781..3274cc4 100644
--- a/Dashboard/DbApplication.cs
+++ b/Dashboard/DbApplication.cs
@@ -31,7 +31,7 @@ namespace Dashboard
///
/// Application icon.
///
- public QImage? Icon
+ public Image? Icon
{
get => Platform.Icon;
set => Platform.Icon = value;
diff --git a/Dashboard/ImmediateDraw/DrawList.cs b/Dashboard/ImmediateDraw/DrawList.cs
index 0c45901..176730a 100644
--- a/Dashboard/ImmediateDraw/DrawList.cs
+++ b/Dashboard/ImmediateDraw/DrawList.cs
@@ -232,7 +232,7 @@ namespace Dashboard.ImmediateDraw
}
}
- public void Image(QImage texture, in Rectangle rectangle)
+ public void Image(Image texture, in Rectangle rectangle)
{
Enqueue(Command.Image);
Enqueue((Frame)(int)ImageCommandFlags.Single);
@@ -240,7 +240,7 @@ namespace Dashboard.ImmediateDraw
Enqueue(rectangle);
}
- public void Image(QImage texture, in Rectangle rectangle, in Rectangle uv)
+ public void Image(Image texture, in Rectangle rectangle, in Rectangle uv)
{
Enqueue(Command.Image);
Enqueue((Frame)(int)(ImageCommandFlags.Single | ImageCommandFlags.UVs));
@@ -249,7 +249,7 @@ namespace Dashboard.ImmediateDraw
Enqueue(uv);
}
- public void Image(QImage texture, ReadOnlySpan rectangles, bool interleavedUV = false)
+ public void Image(Image texture, ReadOnlySpan rectangles, bool interleavedUV = false)
{
int count = rectangles.Length;
ImageCommandFlags flags = ImageCommandFlags.None;
@@ -270,7 +270,7 @@ namespace Dashboard.ImmediateDraw
}
}
- public void Image(QImage texture, ReadOnlySpan rectangles, ReadOnlySpan uvs)
+ public void Image(Image texture, ReadOnlySpan rectangles, ReadOnlySpan uvs)
{
int count = Math.Min(rectangles.Length, uvs.Length);
Enqueue(Command.Image);
@@ -284,7 +284,7 @@ namespace Dashboard.ImmediateDraw
}
}
- public void Image3D(QImage texture, in Image3DCall call)
+ public void Image3D(Image texture, in Image3DCall call)
{
Enqueue(Command.Image);
Enqueue(new Frame(ImageCommandFlags.Image3d | ImageCommandFlags.Single));
@@ -294,7 +294,7 @@ namespace Dashboard.ImmediateDraw
Enqueue(new Frame(call.Layer));
}
- public void Image3D(QImage texture, ReadOnlySpan calls)
+ public void Image3D(Image texture, ReadOnlySpan calls)
{
Enqueue(Command.Image);
Enqueue(new Frame((int)ImageCommandFlags.Image3d, calls.Length));
diff --git a/Dashboard/Media/Color/FormatConvert.cs b/Dashboard/Media/Color/FormatConvert.cs
index f9c57cf..856bba2 100644
--- a/Dashboard/Media/Color/FormatConvert.cs
+++ b/Dashboard/Media/Color/FormatConvert.cs
@@ -9,12 +9,12 @@ namespace Dashboard.Media.Color
{
switch (image.Format)
{
- case QImageFormat.RaF:
- case QImageFormat.RaU8:
- case QImageFormat.RgbF:
- case QImageFormat.RgbU8:
- case QImageFormat.RgbaF:
- case QImageFormat.RgbaU8:
+ case ImageFormat.RaF:
+ case ImageFormat.RaU8:
+ case ImageFormat.RgbF:
+ case ImageFormat.RgbU8:
+ case ImageFormat.RgbaF:
+ case ImageFormat.RgbaU8:
break;
default:
return;
diff --git a/Dashboard/Media/Color/ImageBuffer.cs b/Dashboard/Media/Color/ImageBuffer.cs
index 11a6d28..d580aa4 100644
--- a/Dashboard/Media/Color/ImageBuffer.cs
+++ b/Dashboard/Media/Color/ImageBuffer.cs
@@ -3,19 +3,19 @@ using System.Runtime.InteropServices;
namespace Dashboard.Media.Color
{
- public class QImageBuffer : QImage
+ public class QImageBuffer : Image
{
private byte[] buffer;
GCHandle handle;
private bool isSdf = false;
- public override QImageFormat InternalFormat { get; }
+ public override ImageFormat InternalFormat { get; }
public override int Width { get; }
public override int Height { get; }
public override int Depth { get; }
public override bool IsSdf => isSdf;
- public QImageBuffer(QImageFormat format, int width, int height, int depth = 1)
+ public QImageBuffer(ImageFormat format, int width, int height, int depth = 1)
{
InternalFormat = format;
Width = width;
diff --git a/Dashboard/Media/Color/LockIO.cs b/Dashboard/Media/Color/LockIO.cs
index 4c6fc9b..45888ff 100644
--- a/Dashboard/Media/Color/LockIO.cs
+++ b/Dashboard/Media/Color/LockIO.cs
@@ -9,7 +9,7 @@ namespace Dashboard.Media.Color
public int Width => Lock.Width;
public int Height => Lock.Height;
public int Depth => Depth;
- public QImageFormat Format => Lock.Format;
+ public ImageFormat Format => Lock.Format;
public LockIO(QImageLock imageLock)
{
@@ -29,11 +29,11 @@ namespace Dashboard.Media.Color
switch (Format)
{
default:
- case QImageFormat.RedU8: return new Color4(ptr[0], 0, 0, 255);
- case QImageFormat.AlphaU8: return new Color4(0, 0, 0, ptr[0]);
- case QImageFormat.RaU8: return new Color4(ptr[0], 0, 0, ptr[1]);
- case QImageFormat.RgbU8: return new Color4(ptr[0], ptr[1], ptr[2], 255);
- case QImageFormat.RgbaU8: return new Color4(ptr[0], ptr[1], ptr[2], ptr[3]);
+ case ImageFormat.RedU8: return new Color4(ptr[0], 0, 0, 255);
+ case ImageFormat.AlphaU8: return new Color4(0, 0, 0, ptr[0]);
+ case ImageFormat.RaU8: return new Color4(ptr[0], 0, 0, ptr[1]);
+ case ImageFormat.RgbU8: return new Color4(ptr[0], ptr[1], ptr[2], 255);
+ case ImageFormat.RgbaU8: return new Color4(ptr[0], ptr[1], ptr[2], ptr[3]);
}
}
@@ -45,22 +45,22 @@ namespace Dashboard.Media.Color
switch (Format)
{
default:
- case QImageFormat.RedU8:
+ case ImageFormat.RedU8:
ptr[0] = (byte)(value.R * 255);
break;
- case QImageFormat.AlphaU8:
+ case ImageFormat.AlphaU8:
ptr[0] = (byte)(value.A * 255);
break;
- case QImageFormat.RaU8:
+ case ImageFormat.RaU8:
ptr[0] = (byte)(value.R * 255);
ptr[1] = (byte)(value.A * 255);
break;
- case QImageFormat.RgbU8:
+ case ImageFormat.RgbU8:
ptr[0] = (byte)(value.R * 255);
ptr[1] = (byte)(value.G * 255);
ptr[2] = (byte)(value.B * 255);
break;
- case QImageFormat.RgbaU8:
+ case ImageFormat.RgbaU8:
ptr[0] = (byte)(value.R * 255);
ptr[1] = (byte)(value.G * 255);
ptr[2] = (byte)(value.B * 255);
@@ -82,7 +82,7 @@ namespace Dashboard.Media.Color
public int Width => Lock.Width;
public int Height => Lock.Height;
public int Depth => Depth;
- public QImageFormat Format => Lock.Format;
+ public ImageFormat Format => Lock.Format;
public LockIOF(QImageLock imageLock)
{
@@ -102,11 +102,11 @@ namespace Dashboard.Media.Color
switch (Format)
{
default:
- case QImageFormat.RedU8: return new Color4(ptr[0], 0, 0, 1);
- case QImageFormat.AlphaU8: return new Color4(0, 0, 0, ptr[0]);
- case QImageFormat.RaU8: return new Color4(ptr[0], 0, 0, ptr[1]);
- case QImageFormat.RgbU8: return new Color4(ptr[0], ptr[1], ptr[2], 1);
- case QImageFormat.RgbaU8: return new Color4(ptr[0], ptr[1], ptr[2], ptr[3]);
+ case ImageFormat.RedU8: return new Color4(ptr[0], 0, 0, 1);
+ case ImageFormat.AlphaU8: return new Color4(0, 0, 0, ptr[0]);
+ case ImageFormat.RaU8: return new Color4(ptr[0], 0, 0, ptr[1]);
+ case ImageFormat.RgbU8: return new Color4(ptr[0], ptr[1], ptr[2], 1);
+ case ImageFormat.RgbaU8: return new Color4(ptr[0], ptr[1], ptr[2], ptr[3]);
}
}
@@ -118,22 +118,22 @@ namespace Dashboard.Media.Color
switch (Format)
{
default:
- case QImageFormat.RedU8:
+ case ImageFormat.RedU8:
ptr[0] = value.R;
break;
- case QImageFormat.AlphaU8:
+ case ImageFormat.AlphaU8:
ptr[0] = value.A;
break;
- case QImageFormat.RaU8:
+ case ImageFormat.RaU8:
ptr[0] = value.R;
ptr[1] = value.A;
break;
- case QImageFormat.RgbU8:
+ case ImageFormat.RgbU8:
ptr[0] = value.R;
ptr[1] = value.G;
ptr[2] = value.B;
break;
- case QImageFormat.RgbaU8:
+ case ImageFormat.RgbaU8:
ptr[0] = value.R;
ptr[1] = value.G;
ptr[2] = value.B;
diff --git a/Dashboard/Media/Extensions.cs b/Dashboard/Media/Extensions.cs
index 32cbac2..1d443ad 100644
--- a/Dashboard/Media/Extensions.cs
+++ b/Dashboard/Media/Extensions.cs
@@ -2,68 +2,68 @@ namespace Dashboard.Media
{
public static class Extensions
{
- public static bool IsU8(this QImageFormat format)
+ public static bool IsU8(this ImageFormat format)
{
switch (format)
{
- case QImageFormat.AlphaU8:
- case QImageFormat.RedU8:
- case QImageFormat.RaU8:
- case QImageFormat.RgbU8:
- case QImageFormat.RgbaU8:
+ case ImageFormat.AlphaU8:
+ case ImageFormat.RedU8:
+ case ImageFormat.RaU8:
+ case ImageFormat.RgbU8:
+ case ImageFormat.RgbaU8:
return true;
default:
return false;
}
}
- public static bool IsFloat(this QImageFormat format)
+ public static bool IsFloat(this ImageFormat format)
{
switch (format)
{
- case QImageFormat.AlphaF:
- case QImageFormat.RedF:
- case QImageFormat.RaF:
- case QImageFormat.RgbF:
- case QImageFormat.RgbaF:
+ case ImageFormat.AlphaF:
+ case ImageFormat.RedF:
+ case ImageFormat.RaF:
+ case ImageFormat.RgbF:
+ case ImageFormat.RgbaF:
return true;
default:
return false;
}
}
- public static int BytesPerPixel(this QImageFormat format)
+ public static int BytesPerPixel(this ImageFormat format)
{
switch (format)
{
- case QImageFormat.AlphaU8: return sizeof(byte);
- case QImageFormat.RedU8: return sizeof(byte);
- case QImageFormat.RaU8: return 2 * sizeof(byte);
- case QImageFormat.RgbU8: return 3 * sizeof(byte);
- case QImageFormat.RgbaU8: return 4 * sizeof(byte);
- case QImageFormat.AlphaF: return sizeof(float);
- case QImageFormat.RedF: return sizeof(float);
- case QImageFormat.RaF: return 2 * sizeof(float);
- case QImageFormat.RgbF: return 3 * sizeof(float);
- case QImageFormat.RgbaF: return 4 * sizeof(float);
+ case ImageFormat.AlphaU8: return sizeof(byte);
+ case ImageFormat.RedU8: return sizeof(byte);
+ case ImageFormat.RaU8: return 2 * sizeof(byte);
+ case ImageFormat.RgbU8: return 3 * sizeof(byte);
+ case ImageFormat.RgbaU8: return 4 * sizeof(byte);
+ case ImageFormat.AlphaF: return sizeof(float);
+ case ImageFormat.RedF: return sizeof(float);
+ case ImageFormat.RaF: return 2 * sizeof(float);
+ case ImageFormat.RgbF: return 3 * sizeof(float);
+ case ImageFormat.RgbaF: return 4 * sizeof(float);
default: return 0;
}
}
- public static int Channels(this QImageFormat format)
+ public static int Channels(this ImageFormat format)
{
switch (format)
{
- case QImageFormat.AlphaU8: return 1;
- case QImageFormat.RedU8: return 1;
- case QImageFormat.RaU8: return 2;
- case QImageFormat.RgbU8: return 3;
- case QImageFormat.RgbaU8: return 4;
- case QImageFormat.AlphaF: return 1;
- case QImageFormat.RedF: return 1;
- case QImageFormat.RaF: return 2;
- case QImageFormat.RgbF: return 3;
- case QImageFormat.RgbaF: return 4;
+ case ImageFormat.AlphaU8: return 1;
+ case ImageFormat.RedU8: return 1;
+ case ImageFormat.RaU8: return 2;
+ case ImageFormat.RgbU8: return 3;
+ case ImageFormat.RgbaU8: return 4;
+ case ImageFormat.AlphaF: return 1;
+ case ImageFormat.RedF: return 1;
+ case ImageFormat.RaF: return 2;
+ case ImageFormat.RgbF: return 3;
+ case ImageFormat.RgbaF: return 4;
default: return 0;
}
}
diff --git a/Dashboard/Media/QFont.cs b/Dashboard/Media/Font.cs
similarity index 88%
rename from Dashboard/Media/QFont.cs
rename to Dashboard/Media/Font.cs
index 7087bcf..19b1aa2 100644
--- a/Dashboard/Media/QFont.cs
+++ b/Dashboard/Media/Font.cs
@@ -2,14 +2,14 @@ using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Dashboard.Media;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
namespace Dashboard.Media
{
///
/// Abstract class that represents a font.
///
- public abstract class QFont : IDisposable
+ public abstract class Font : IDisposable
{
public abstract FontFace Face { get; }
public string Family => Face.Family;
@@ -18,7 +18,7 @@ namespace Dashboard.Media
public FontStretch Stretch => Face.Stretch;
public abstract bool HasRune(int rune);
- protected abstract QImage Render(out QGlyphMetrics metrics, int codepoint, float size, in FontRasterizerOptions options);
+ protected abstract Image Render(out GlyphMetrics metrics, int codepoint, float size, in FontRasterizerOptions options);
private readonly Dictionary _atlasses = new Dictionary();
@@ -69,13 +69,13 @@ namespace Dashboard.Media
atlas = new FontAtlas(width, height, DbApplication.Current.FontProvider.RasterizerOptions.Sdf);
}
- public void Get(int codepoint, out FontGlyph glyph, QFont font)
+ public void Get(int codepoint, out FontGlyph glyph, Font font)
{
if (glyphs.TryGetValue(codepoint, out glyph))
return;
- QImage image = font.Render(
- out QGlyphMetrics metrics,
+ Image image = font.Render(
+ out GlyphMetrics metrics,
codepoint,
Size,
DbApplication.Current.FontProvider.RasterizerOptions);
@@ -102,11 +102,11 @@ namespace Dashboard.Media
public readonly struct FontGlyph
{
public readonly int CodePoint;
- public readonly QImage? Image;
- public readonly QGlyphMetrics Metrics;
+ public readonly Image? Image;
+ public readonly GlyphMetrics Metrics;
public readonly Rectangle UVs;
- public FontGlyph(int codepoint, QImage? image, in QGlyphMetrics metrics, in Rectangle uvs)
+ public FontGlyph(int codepoint, Image? image, in GlyphMetrics metrics, in Rectangle uvs)
{
CodePoint = codepoint;
Image = image;
diff --git a/Dashboard/Media/Font/FontAtlas.cs b/Dashboard/Media/Font/FontAtlas.cs
index a159782..e91b9da 100644
--- a/Dashboard/Media/Font/FontAtlas.cs
+++ b/Dashboard/Media/Font/FontAtlas.cs
@@ -3,12 +3,12 @@ using System.Collections.Generic;
using Dashboard.Media.Color;
using OpenTK.Mathematics;
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
public struct FontAtlasGlyphInfo
{
public int Codepoint;
- public QImage Image;
+ public Image Image;
public Rectangle UVs;
}
@@ -109,7 +109,7 @@ namespace Dashboard.Media.Font
private class AtlasPage : IDisposable
{
- public QImage Image;
+ public Image Image;
public int PointerX, PointerY;
public int RowHeight;
public int Expansion;
@@ -118,7 +118,7 @@ namespace Dashboard.Media.Font
public AtlasPage(int width, int height, int expansion)
{
- Image = new QImageBuffer(QImageFormat.AlphaU8, width, height);
+ Image = new QImageBuffer(ImageFormat.AlphaU8, width, height);
Expansion = expansion;
Reset();
}
diff --git a/Dashboard/Media/Font/FontFace.cs b/Dashboard/Media/Font/FontFace.cs
index d121eaf..2fe2d7d 100644
--- a/Dashboard/Media/Font/FontFace.cs
+++ b/Dashboard/Media/Font/FontFace.cs
@@ -1,7 +1,7 @@
using System;
using System.Text;
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
public readonly struct FontFace : IEquatable
{
diff --git a/Dashboard/Media/Font/FontSlant.cs b/Dashboard/Media/Font/FontSlant.cs
index 1236791..8de3f42 100644
--- a/Dashboard/Media/Font/FontSlant.cs
+++ b/Dashboard/Media/Font/FontSlant.cs
@@ -1,4 +1,4 @@
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
public enum FontSlant
{
diff --git a/Dashboard/Media/Font/FontStretch.cs b/Dashboard/Media/Font/FontStretch.cs
index 85296a2..966e698 100644
--- a/Dashboard/Media/Font/FontStretch.cs
+++ b/Dashboard/Media/Font/FontStretch.cs
@@ -1,4 +1,4 @@
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
///
/// Enumeration of font stretch values.
diff --git a/Dashboard/Media/Font/FontWeight.cs b/Dashboard/Media/Font/FontWeight.cs
index 68bc03e..b09a912 100644
--- a/Dashboard/Media/Font/FontWeight.cs
+++ b/Dashboard/Media/Font/FontWeight.cs
@@ -1,6 +1,6 @@
using System;
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
public enum FontWeight
{
diff --git a/Dashboard/Media/Font/SystemFontFamily.cs b/Dashboard/Media/Font/SystemFontFamily.cs
index 5a2e0e1..0089010 100644
--- a/Dashboard/Media/Font/SystemFontFamily.cs
+++ b/Dashboard/Media/Font/SystemFontFamily.cs
@@ -1,4 +1,4 @@
-namespace Dashboard.Media.Font
+namespace Dashboard.Media.Fonts
{
public enum SystemFontFamily
{
diff --git a/Dashboard/Media/QGlyphMetrics.cs b/Dashboard/Media/GlyphMetrics.cs
similarity index 95%
rename from Dashboard/Media/QGlyphMetrics.cs
rename to Dashboard/Media/GlyphMetrics.cs
index 094405f..1047976 100644
--- a/Dashboard/Media/QGlyphMetrics.cs
+++ b/Dashboard/Media/GlyphMetrics.cs
@@ -5,7 +5,7 @@ namespace Dashboard.Media
///
/// Glyph properties with metrics based on FreeType glyph metrics.
///
- public struct QGlyphMetrics
+ public struct GlyphMetrics
{
///
/// The code point for the character.
@@ -32,7 +32,7 @@ namespace Dashboard.Media
///
public Vector2 Advance { get; }
- public QGlyphMetrics(
+ public GlyphMetrics(
int character,
Vector2 size,
Vector2 horizontalBearing,
diff --git a/Dashboard/Media/QImage.cs b/Dashboard/Media/Image.cs
similarity index 89%
rename from Dashboard/Media/QImage.cs
rename to Dashboard/Media/Image.cs
index 870fc51..433fa38 100644
--- a/Dashboard/Media/QImage.cs
+++ b/Dashboard/Media/Image.cs
@@ -1,12 +1,12 @@
using System;
namespace Dashboard.Media
{
- public abstract class QImage : IDisposable
+ public abstract class Image : IDisposable
{
public abstract int Width { get; }
public abstract int Height { get; }
public abstract int Depth { get; }
- public abstract QImageFormat InternalFormat { get; }
+ public abstract ImageFormat InternalFormat { get; }
public virtual int MipMapLevels => 0;
public virtual bool Premultiplied => false;
public virtual bool IsSdf => false;
@@ -32,12 +32,12 @@ namespace Dashboard.Media
public struct QImageLockOptions
{
- public QImageFormat Format { get; }
+ public ImageFormat Format { get; }
public bool Premultiply { get; }
public int MipLevel { get; }
- public static QImageLockOptions Default { get; } = new QImageLockOptions(QImageFormat.RgbaU8, true, 0);
+ public static QImageLockOptions Default { get; } = new QImageLockOptions(ImageFormat.RgbaU8, true, 0);
- public QImageLockOptions(QImageFormat format, bool premultiply, int level)
+ public QImageLockOptions(ImageFormat format, bool premultiply, int level)
{
Format = format;
Premultiply = premultiply;
@@ -47,13 +47,13 @@ namespace Dashboard.Media
public struct QImageLock
{
- public QImageFormat Format { get; }
+ public ImageFormat Format { get; }
public int Width { get; }
public int Height { get; }
public int Depth { get; }
public IntPtr ImagePtr { get; }
- public QImageLock(QImageFormat format, int width, int height, int depth, IntPtr ptr)
+ public QImageLock(ImageFormat format, int width, int height, int depth, IntPtr ptr)
{
Format = format;
Width = width;
diff --git a/Dashboard/Media/ImageFormat.cs b/Dashboard/Media/ImageFormat.cs
index 9ae06f5..f32abf3 100644
--- a/Dashboard/Media/ImageFormat.cs
+++ b/Dashboard/Media/ImageFormat.cs
@@ -2,7 +2,7 @@ using System;
namespace Dashboard.Media
{
- public enum QImageFormat
+ public enum ImageFormat
{
Undefined,
RedU8,
diff --git a/Dashboard/OpenGL/GL21Driver.cs b/Dashboard/OpenGL/GL21Driver.cs
index 713d28d..35b8b12 100644
--- a/Dashboard/OpenGL/GL21Driver.cs
+++ b/Dashboard/OpenGL/GL21Driver.cs
@@ -331,15 +331,15 @@ namespace Dashboard.OpenGL
internal class TextureManager : IDisposable
{
- private readonly Dictionary textures = new Dictionary();
- private readonly HashSet imagesNotUsed = new HashSet();
+ private readonly Dictionary textures = new Dictionary();
+ private readonly HashSet imagesNotUsed = new HashSet();
private bool isDisposed = false;
public void BeginFrame()
{
if (imagesNotUsed.Count > 0)
{
- foreach (QImage image in imagesNotUsed)
+ foreach (Image image in imagesNotUsed)
{
GL.DeleteTexture(textures[image]);
}
@@ -347,13 +347,13 @@ namespace Dashboard.OpenGL
imagesNotUsed.Clear();
}
- foreach (QImage image in textures.Keys)
+ foreach (Image image in textures.Keys)
{
imagesNotUsed.Add(image);
}
}
- public int GetTexture(QImage image)
+ public int GetTexture(Image image)
{
if (textures.TryGetValue(image, out int texture))
{
@@ -372,7 +372,7 @@ namespace Dashboard.OpenGL
return textures[image] = texture;
}
- public int UploadTexture3d(QImage image3d)
+ public int UploadTexture3d(Image image3d)
{
int texture = GL.GenTexture();
@@ -388,7 +388,7 @@ namespace Dashboard.OpenGL
return texture;
}
- public int UploadTexture2d(QImage image2d)
+ public int UploadTexture2d(Image image2d)
{
int texture = GL.GenTexture();
@@ -403,15 +403,15 @@ namespace Dashboard.OpenGL
switch (image2d.InternalFormat)
{
- case QImageFormat.RedU8:
- case QImageFormat.RedF:
+ case ImageFormat.RedU8:
+ case ImageFormat.RedF:
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleR, (int)All.Red);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleG, (int)All.Red);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleB, (int)All.Red);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleA, (int)All.One);
break;
- case QImageFormat.AlphaU8:
- case QImageFormat.AlphaF:
+ case ImageFormat.AlphaU8:
+ case ImageFormat.AlphaF:
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleR, (int)All.One);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleG, (int)All.One);
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleB, (int)All.One);
@@ -433,28 +433,28 @@ namespace Dashboard.OpenGL
GL.DeleteTextures(ids.Length, ref ids[0]);
}
- private static readonly Dictionary s_InternalFormat = new Dictionary()
+ private static readonly Dictionary s_InternalFormat = new Dictionary()
{
- [QImageFormat.AlphaF] = PixelFormat.Alpha,
- [QImageFormat.AlphaU8] = PixelFormat.Alpha,
- [QImageFormat.RedF] = PixelFormat.Red,
- [QImageFormat.RedU8] = PixelFormat.Red,
- [QImageFormat.RgbF] = PixelFormat.Rgb,
- [QImageFormat.RgbU8] = PixelFormat.Rgb,
- [QImageFormat.RgbaU8] = PixelFormat.Rgba,
- [QImageFormat.RgbaF] = PixelFormat.Rgba,
+ [ImageFormat.AlphaF] = PixelFormat.Alpha,
+ [ImageFormat.AlphaU8] = PixelFormat.Alpha,
+ [ImageFormat.RedF] = PixelFormat.Red,
+ [ImageFormat.RedU8] = PixelFormat.Red,
+ [ImageFormat.RgbF] = PixelFormat.Rgb,
+ [ImageFormat.RgbU8] = PixelFormat.Rgb,
+ [ImageFormat.RgbaU8] = PixelFormat.Rgba,
+ [ImageFormat.RgbaF] = PixelFormat.Rgba,
};
- private static readonly Dictionary s_PixelType = new Dictionary()
+ private static readonly Dictionary s_PixelType = new Dictionary()
{
- [QImageFormat.AlphaF] = PixelType.Float,
- [QImageFormat.RedF] = PixelType.Float,
- [QImageFormat.RgbF] = PixelType.Float,
- [QImageFormat.RgbaF] = PixelType.Float,
- [QImageFormat.AlphaU8] = PixelType.UnsignedByte,
- [QImageFormat.RedU8] = PixelType.UnsignedByte,
- [QImageFormat.RgbU8] = PixelType.UnsignedByte,
- [QImageFormat.RgbaU8] = PixelType.UnsignedByte,
+ [ImageFormat.AlphaF] = PixelType.Float,
+ [ImageFormat.RedF] = PixelType.Float,
+ [ImageFormat.RgbF] = PixelType.Float,
+ [ImageFormat.RgbaF] = PixelType.Float,
+ [ImageFormat.AlphaU8] = PixelType.UnsignedByte,
+ [ImageFormat.RedU8] = PixelType.UnsignedByte,
+ [ImageFormat.RgbU8] = PixelType.UnsignedByte,
+ [ImageFormat.RgbaU8] = PixelType.UnsignedByte,
};
}
}
\ No newline at end of file
diff --git a/Dashboard/PAL/IDbPlatform.cs b/Dashboard/PAL/IDbPlatform.cs
index 9a8a561..ac5cf0f 100644
--- a/Dashboard/PAL/IDbPlatform.cs
+++ b/Dashboard/PAL/IDbPlatform.cs
@@ -25,7 +25,7 @@ namespace Dashboard.PAL
///
/// The default icon for the application.
///
- QImage? Icon { get; set; }
+ Image? Icon { get; set; }
///
/// The event raised when an event is received.
diff --git a/Dashboard/PAL/IFontDatabase.cs b/Dashboard/PAL/IFontDatabase.cs
index 22c392d..41d2b7c 100644
--- a/Dashboard/PAL/IFontDatabase.cs
+++ b/Dashboard/PAL/IFontDatabase.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
namespace Dashboard.PAL
{
diff --git a/Dashboard/PAL/IFontFactory.cs b/Dashboard/PAL/IFontFactory.cs
index 5c39ba7..2a89898 100644
--- a/Dashboard/PAL/IFontFactory.cs
+++ b/Dashboard/PAL/IFontFactory.cs
@@ -7,6 +7,6 @@ namespace Dashboard.PAL
{
public interface IFontFactory
{
- bool TryOpen(Stream stream, [NotNullWhen(true)] out QFont font);
+ bool TryOpen(Stream stream, [NotNullWhen(true)] out Font font);
}
}
\ No newline at end of file
diff --git a/Dashboard/Style.cs b/Dashboard/Style.cs
index d040f8f..8560ff4 100644
--- a/Dashboard/Style.cs
+++ b/Dashboard/Style.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Dashboard.Media;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using OpenTK.Mathematics;
namespace Dashboard
@@ -110,9 +110,9 @@ namespace Dashboard
set => this["list-marker-position"] = value;
}
- public QImage? ListMarkerImage
+ public Image? ListMarkerImage
{
- get => (QImage?)this["list-marker-image"];
+ get => (Image?)this["list-marker-image"];
set => this["list-marker-image"] = value;
}
diff --git a/Dashboard/Typography/FontProvider.cs b/Dashboard/Typography/FontProvider.cs
index a79854c..970cfab 100644
--- a/Dashboard/Typography/FontProvider.cs
+++ b/Dashboard/Typography/FontProvider.cs
@@ -1,5 +1,5 @@
using Dashboard.Media;
-using Dashboard.Media.Font;
+using Dashboard.Media.Fonts;
using Dashboard.PAL;
using System;
using System.Collections.Generic;
@@ -13,18 +13,18 @@ namespace Dashboard.Typography
///
public class FontProvider : IDisposable
{
- private Dictionary Fonts { get; } = new Dictionary();
- private HashSet UsedFonts { get; } = new HashSet();
+ private Dictionary Fonts { get; } = new Dictionary();
+ private HashSet UsedFonts { get; } = new HashSet();
public readonly FontRasterizerOptions RasterizerOptions;
public IFontDataBase? Database { get; set; }
public IFontFactory? FontFactory { get; set; }
private readonly DbApplication App;
- public QFont this[FontFace info]
+ public Font this[FontFace info]
{
get
{
- if (!Fonts.TryGetValue(info, out QFont? font))
+ if (!Fonts.TryGetValue(info, out Font? font))
{
using Stream str = Database?.Open(info) ?? throw new Exception("Font could not be found.");
@@ -43,7 +43,7 @@ namespace Dashboard.Typography
}
}
- public QFont this[SystemFontFamily family]
+ public Font this[SystemFontFamily family]
{
get
{
@@ -99,7 +99,7 @@ namespace Dashboard.Typography
if (isDisposed) return;
isDisposed = true;
- foreach (QFont font in Fonts.Values)
+ foreach (Font font in Fonts.Values)
{
font.Dispose();
}
diff --git a/Dashboard/Typography/TextLayout.cs b/Dashboard/Typography/TextLayout.cs
index b8eef58..764856b 100644
--- a/Dashboard/Typography/TextLayout.cs
+++ b/Dashboard/Typography/TextLayout.cs
@@ -354,13 +354,13 @@ namespace Dashboard.Typography
public struct TypesetCharacter
{
public int Character;
- public QImage Texture;
+ public Image Texture;
public Rectangle Position;
public Rectangle UV;
public TypesetCharacter(
int chr,
- QImage texture,
+ Image texture,
in Rectangle position,
in Rectangle uv)
{
diff --git a/Dashboard/Typography/Typesetter.cs b/Dashboard/Typography/Typesetter.cs
index f6b862c..cb9356e 100644
--- a/Dashboard/Typography/Typesetter.cs
+++ b/Dashboard/Typography/Typesetter.cs
@@ -75,7 +75,7 @@ namespace Dashboard.Typography
}
}
- public static Vector2 MeasureHorizontal(ReadOnlySpan str, float size, QFont font)
+ public static Vector2 MeasureHorizontal(ReadOnlySpan str, float size, Font font)
{
var enumerator = new LineEnumerator(str);
@@ -103,9 +103,9 @@ namespace Dashboard.Typography
return new Vector2(width, height);
}
- public static void TypesetHorizontalDirect(this DrawList list, ReadOnlySpan str, Vector2 origin, float size, QFont font)
+ public static void TypesetHorizontalDirect(this DrawList list, ReadOnlySpan str, Vector2 origin, float size, Font font)
{
- Dictionary drawInfo = new Dictionary();
+ Dictionary drawInfo = new Dictionary();
var enumerator = new LineEnumerator(str);
Vector2 pen = origin;
@@ -135,8 +135,8 @@ namespace Dashboard.Typography
int codepoint = r.Value;
font.Get(codepoint, size, out FontGlyph glyph);
- ref readonly QGlyphMetrics metrics = ref glyph.Metrics;
- QImage? image = glyph.Image;
+ ref readonly GlyphMetrics metrics = ref glyph.Metrics;
+ Image? image = glyph.Image;
if (image == null)
{
@@ -175,7 +175,7 @@ namespace Dashboard.Typography
private struct FontDrawInfo
{
- public QImage Image;
+ public Image Image;
public List rectangles;
}
}
diff --git a/Dashboard/VertexGenerator/DrawCallQueue.cs b/Dashboard/VertexGenerator/DrawCallQueue.cs
index 6cbb319..b34e6af 100644
--- a/Dashboard/VertexGenerator/DrawCallQueue.cs
+++ b/Dashboard/VertexGenerator/DrawCallQueue.cs
@@ -14,7 +14,7 @@ namespace Dashboard.VertexGenerator
private int _start;
private int _baseOffset;
private Rectangle _bounds;
- private QImage? _texture;
+ private Image? _texture;
public int ZDepth { get; private set; }
public DbVertex[] VertexArray => _vertices.InternalArray;
@@ -33,7 +33,7 @@ namespace Dashboard.VertexGenerator
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void StartDrawCall(in Rectangle bounds, QImage? texture, int baseOffset)
+ public void StartDrawCall(in Rectangle bounds, Image? texture, int baseOffset)
{
_start = ElementCount;
_texture = texture;
@@ -48,7 +48,7 @@ namespace Dashboard.VertexGenerator
public void StartDrawCall(in Rectangle bounds, int baseOffset) => StartDrawCall(bounds, null, baseOffset);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void StartDrawCall(in Rectangle bounds, QImage texture) => StartDrawCall(bounds, texture, _vertices.Count);
+ public void StartDrawCall(in Rectangle bounds, Image texture) => StartDrawCall(bounds, texture, _vertices.Count);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void AddVertex(in DbVertex vertex)
@@ -100,9 +100,9 @@ namespace Dashboard.VertexGenerator
public int Start { get; }
public int Count { get; }
public Rectangle Bounds { get; }
- public QImage? Texture { get; }
+ public Image? Texture { get; }
- public DrawCall(int start, int count, in Rectangle bounds, QImage? texture)
+ public DrawCall(int start, int count, in Rectangle bounds, Image? texture)
{
Start = start;
Count = count;
diff --git a/Dashboard/VertexGenerator/VertexDrawingEngine.cs b/Dashboard/VertexGenerator/VertexDrawingEngine.cs
index 50419f2..bfff96c 100644
--- a/Dashboard/VertexGenerator/VertexDrawingEngine.cs
+++ b/Dashboard/VertexGenerator/VertexDrawingEngine.cs
@@ -1016,7 +1016,7 @@ namespace Dashboard.VertexGenerator
{
Frame frame = queue.Dequeue();
ImageCommandFlags flags = (ImageCommandFlags)frame.I1;
- QImage image = queue.Dequeue().As();
+ Image image = queue.Dequeue().As();
int count = flags.HasFlag(ImageCommandFlags.Single) ? 1 : frame.I2;
if (flags.HasFlag(ImageCommandFlags.Image3d))
@@ -1029,7 +1029,7 @@ namespace Dashboard.VertexGenerator
}
}
- private void Image2d(DrawQueue queue, QImage image, int count, bool uv)
+ private void Image2d(DrawQueue queue, Image image, int count, bool uv)
{
DrawQueue.StartDrawCall(Viewport, image);
@@ -1073,7 +1073,7 @@ namespace Dashboard.VertexGenerator
DrawQueue.EndDrawCall();
}
- private void Image3d(DrawQueue queue, QImage image, int count)
+ private void Image3d(DrawQueue queue, Image image, int count)
{
DrawQueue.StartDrawCall(Viewport, image);
diff --git a/tests/Dashboard.Demo/Program.cs b/tests/Dashboard.Demo/Program.cs
index e35f45a..0cda6c9 100644
--- a/tests/Dashboard.Demo/Program.cs
+++ b/tests/Dashboard.Demo/Program.cs
@@ -20,7 +20,7 @@ namespace Dashboard.Demo
public class EmptyView : View
{
- private QFont? font;
+ private Font? font;
DashboardBlurg dblurg = new DashboardBlurg();
BlurgResult? result;
// private readonly Label Label = new Label() { Text = "Hello world!", Position = new QVec2(300, 300) };