I'm trying to draw some text in the center of an image, however, it never goes to the center ; stays on the left always.
I would like to know what can i do. The only way i've found to center my text was using Gravity.Center and then calculating offset pixels. But since TextAlignment is there, i believe there might be an easier way.
Here's my code:
Code: Select all
var h1FontMagick = new Drawables().FontPointSize(14).Font("Tahoma", FontStyleType.Bold, FontWeight.Bold, FontStretch.Condensed);
h1FontMagick.Text(0 ,varAltura, "Documento Auxiliar da Nota Fiscal de Consumidor Eletrônica").TextAlignment(TextAlignment.Center).Draw(imgNota);
Thanks !