TextureAlignment enumeration

TextureAlignment enumeration

Specifies the alignment for the tiling of the texture fill.

Members

NameDescription
TopLeftTop left texture alignment.
TopTop texture alignment.
TopRightTop right texture alignment.
LeftLeft texture alignment.
CenterCenter texture alignment.
RightRight texture alignment.
BottomLeftBottom left texture alignment.
BottomBottom texture alignment.
BottomRightBottom right texture alignment.
NoneNone texture alignment.

Examples

Shows how to fill and tiling the texture inside the shape.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

let shape = builder.insertShape(aw.Drawing.ShapeType.Rectangle, 80, 80);

// Apply texture alignment to the shape fill.
shape.fill.presetTextured(aw.Drawing.PresetTexture.Canvas);
shape.fill.textureAlignment = aw.Drawing.TextureAlignment.TopRight;

// Use the compliance option to define the shape using DML if you want to get "TextureAlignment"
// property after the document saves.
let saveOptions = new aw.Saving.OoxmlSaveOptions();
saveOptions.compliance = aw.Saving.OoxmlCompliance.Iso29500_2008_Strict;

doc.save(base.artifactsDir + "Shape.TextureFill.docx", saveOptions);

doc = new aw.Document(base.artifactsDir + "Shape.TextureFill.docx");

shape = doc.getShape(0, true);

expect(shape.fill.textureAlignment).toEqual(aw.Drawing.TextureAlignment.TopRight);
expect(shape.fill.presetTexture).toEqual(aw.Drawing.PresetTexture.Canvas);

See Also