alignment property
HorizontalRuleFormat.alignment property
Gets or sets the alignment of the horizontal rule.
get alignment(): Aspose.Words.Drawing.HorizontalRuleAlignment
Remarks
The default value is HorizontalRuleAlignment.Left.
Examples
Shows how to insert a horizontal rule shape, and customize its formatting.
let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);
let shape = builder.insertHorizontalRule();
let horizontalRuleFormat = shape.horizontalRuleFormat;
horizontalRuleFormat.alignment = aw.Drawing.HorizontalRuleAlignment.Center;
horizontalRuleFormat.widthPercent = 70;
horizontalRuleFormat.height = 3;
horizontalRuleFormat.color = "#0000FF";
horizontalRuleFormat.noShade = true;
expect(shape.isHorizontalRule).toEqual(true);
expect(shape.horizontalRuleFormat.noShade).toEqual(true);
See Also
- module Aspose.Words.Drawing
- class HorizontalRuleFormat