do memegen-style text better. also fix indentation
This commit is contained in:
parent
9de8c6de51
commit
ec6be80143
11
Program.cs
11
Program.cs
@ -169,9 +169,16 @@ public class Photo {
|
||||
if (texture == placeholder && image != null) {
|
||||
IPath yourPolygon = new Star(x: 2000.0f, y: 1000.0f, prongs: 5, innerRadii: 20.0f, outerRadii: 50.0f, angle: Util.PI);
|
||||
image.Mutate(x => x.Fill(Color.White, yourPolygon));
|
||||
Font font = SystemFonts.CreateFont("Consolas", 120);
|
||||
Font font = SystemFonts.CreateFont("Impact", 120);
|
||||
TextOptions options = new(font) {
|
||||
WrappingLength = image.Width,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
Origin = new PointF(image.Width / 2, image.Height / 2 - 60),
|
||||
};
|
||||
string text = "oh no i made a memegen";
|
||||
image.Mutate(x => x.DrawText(text, font, Color.White, new PointF(800, 10)));
|
||||
IBrush brush = Brushes.Solid(Color.White);
|
||||
IPen pen = Pens.Solid(Color.Black, 2.5f);
|
||||
image.Mutate(x => x.DrawText(options, text, brush, pen));
|
||||
Console.WriteLine("making texture for " + file);
|
||||
texture = new Texture(image);
|
||||
image.Dispose();
|
||||
|
Loading…
Reference in New Issue
Block a user