public override void DoCommand(IImageRender imageRender) { var text = PreproccessText(_args["@main_argument"]); var fontSize = int.Parse(_args["fontSize"]); var font = _serviceProvider.GetService <IFontProvider>().GetFont("PF Agora Slab Pro Medium", FontSize.FromPixels(fontSize)); var x = int.Parse(_args["x"]); var y = int.Parse(_args["y"]); var alignment = TextAlignment.Left; switch (_args["align"]) { case "left": alignment = TextAlignment.Left; break; case "center": alignment = TextAlignment.Center; break; case "right": alignment = TextAlignment.Right; break; } imageRender.DrawString(text, font, Color.Black, x, y, alignment); }
public void DrawTopLikersHeader(string text) { _imageRender.DrawString(text, GetDefaultFont(25), Color.FromArgb(231, 165, 128), 634, 231, TextAlignment.Left); }