Specifies the horizontal alignment of text in a text mark.
This JavaScript code will create the mark shown in the image on this page.
// Create a new text mark.
var mark = new ImageGear.Web.UI.Mark(ImageGear.Web.UI.MarkType.Text);
// Set various properties.
mark.set_rectangle({ x: 100, y: 150, width: 275, height: 75 });
mark.set_text('This is a text mark.\nIt has two lines of text.');
mark.set_fontName('Arial');
mark.set_fontSize(14);
mark.set_fontStyle(ImageGear.Web.UI.FontStyle.Underline | ImageGear.Web.UI.FontStyle.Italic);
mark.set_textHorizontalAlignment(ImageGear.Web.UI.HorizontalAlignment.Center);
mark.set_textColor('#7070ff');
// Add the mark to the page.
// Adding it after setting the properties avoids a lot of needless markChanged events.
$find('PageView1').get_artPage().addMark(mark);