|
|
@ -505,14 +505,16 @@ public static class Util { |
|
|
|
} |
|
|
|
|
|
|
|
public static OpenTK.Windowing.Common.Input.Image[] RenderAppIcon() { |
|
|
|
Font font = SystemFonts.CreateFont("MS PMincho", 64, FontStyle.Bold); |
|
|
|
int size = 64; |
|
|
|
Font font = SystemFonts.CreateFont("MS PMincho", size, FontStyle.Bold); |
|
|
|
TextOptions options = new(font); |
|
|
|
Image<Rgba32> image = MakeImage(64, 64); |
|
|
|
Image<Rgba32> image = MakeImage(size, size); |
|
|
|
IBrush brush = Brushes.Solid(Color.Black); |
|
|
|
image.Mutate(x => x.DrawText(options, "撮", brush)); |
|
|
|
byte[] pixelBytes = new byte[64 * 64 * 4]; |
|
|
|
byte[] pixelBytes = new byte[size * size * 4]; |
|
|
|
image.CopyPixelDataTo(pixelBytes); |
|
|
|
OpenTK.Windowing.Common.Input.Image opentkImage = new(64, 64, pixelBytes); |
|
|
|
image.Dispose(); |
|
|
|
OpenTK.Windowing.Common.Input.Image opentkImage = new(size, size, pixelBytes); |
|
|
|
return new OpenTK.Windowing.Common.Input.Image[]{ opentkImage }; |
|
|
|
} |
|
|
|
|
|
|
|