Exemple #1
0
        public static MemeTemplate LoadKomiMemeTemplate()
        {
            var imageRenderer = GetDefaultImageInputRenderer();

            var font         = MemeFonts.GetFont(AvailableFonts.AnimeAce);
            var textRenderer = new TextInputRenderer(font, null, Brushes.Solid(Rgba32.Black), HorizontalAlignment.Left, VerticalAlignment.Top, false);

            var inputField = new InputFieldBuilder()
                             .WithName("Paper", "Whatever Komi's looking at on the paper")
                             .WithVertices(new Point(245, 479), new Point(707, 563), new Point(48, 980), new Point(557, 1067))
                             .WithRenderer(imageRenderer)
                             .WithRenderer(textRenderer)
                             .WithPadding(0.03)
                             .WithMask(new Point(245, 479), new Point(665, 556), new Point(665, 699), new Point(555, 1066), new Point(184, 1068), new Point(184, 633))
                             .Build();

            return(new MemeTemplateBuilder("Images/MemeTemplates/KomiPaper.png")
                   .WithName("Komi")
                   .WithDescription("Komi-san reads something and gets excited!")
                   .WithInputField(inputField)
                   .Build());
        }
Exemple #2
0
        public static MemeTemplate LoadDistractedBoyfriendMemeTemplate()
        {
            var imageRenderer = GetDefaultImageInputRenderer();
            var font          = MemeFonts.GetFont(AvailableFonts.Anton);
            var textRenderer  = new TextInputRenderer(font, Pens.Solid(Rgba32.Black, 2), Brushes.Solid(Rgba32.White), HorizontalAlignment.Center, VerticalAlignment.Center, false);

            var boyfriend = new InputFieldBuilder()
                            .WithName("Boyfriend")
                            .WithVertices(new Point(1338, 823), new Point(1838, 823), new Point(1338, 1083), new Point(1838, 1083))
                            .WithRenderer(imageRenderer)
                            .WithRenderer(textRenderer)
                            .WithPadding(0.03)
                            .Build();

            var girlfriend = new InputFieldBuilder()
                             .WithName("Girlfriend")
                             .WithVertices(new Point(1874, 829), new Point(2314, 829), new Point(1874, 1089), new Point(2314, 1089))
                             .WithRenderer(imageRenderer)
                             .WithRenderer(textRenderer)
                             .WithPadding(0.03)
                             .Build();

            var otherGirl = new InputFieldBuilder()
                            .WithName("The other girl")
                            .WithVertices(new Point(487, 1016), new Point(987, 1016), new Point(487, 1276), new Point(987, 1276))
                            .WithRenderer(imageRenderer)
                            .WithRenderer(textRenderer)
                            .WithPadding(0.03)
                            .Build();

            return(new MemeTemplateBuilder("Images/MemeTemplates/DistractedBoyfriend.jpg")
                   .WithName("Distracted Boyfriend")
                   .WithDescription("Disloyal man walking with his girlfriend and looking amazed at another seductive girl")
                   .WithInputField(boyfriend)
                   .WithInputField(girlfriend)
                   .WithInputField(otherGirl)
                   .Build());
        }
Exemple #3
0
        public override Font ReadJson(JsonReader reader, Type objectType, Font existingValue, bool hasExistingValue, JsonSerializer serializer)
        {
            var props = serializer.Deserialize <FontInfo>(reader);

            return(MemeFonts.GetFont(props.fontName, props.fontSize, props.fontStyle));
        }