com.aspose.words

Class TextureAlignment

  • java.lang.Object
    • com.aspose.words.TextureAlignment
public class TextureAlignment 
extends java.lang.Object

Utility class containing constants. Specifies the alignment for the tiling of the texture fill.

Example:

Shows how to fill and tiling the texture inside the shape.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

Shape shape = builder.insertShape(ShapeType.RECTANGLE, 80.0, 80.0);

// Apply texture alignment to the shape fill.
shape.getFill().presetTextured(PresetTexture.CANVAS);
shape.getFill().setTextureAlignment(TextureAlignment.TOP_RIGHT);

// Use the compliance option to define the shape using DML if you want to get "TextureAlignment"
// property after the document saves.
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(); { saveOptions.setCompliance(OoxmlCompliance.ISO_29500_2008_STRICT); }

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

Field Summary
static final intTOP_LEFT = 0
Top left texture alignment.
static final intTOP = 1
Top texture alignment.
static final intTOP_RIGHT = 2
Top right texture alignment.
static final intLEFT = 3
Left texture alignment.
static final intCENTER = 4
Center texture alignment.
static final intRIGHT = 5
Right texture alignment.
static final intBOTTOM_LEFT = 6
Bottom left texture alignment.
static final intBOTTOM = 7
Bottom texture alignment.
static final intBOTTOM_RIGHT = 8
Bottom right texture alignment.
static final intNONE = 9
None texture alignment.
 

    • Field Detail

      • TOP_LEFT = 0

        public static final int TOP_LEFT
        Top left texture alignment.
      • TOP = 1

        public static final int TOP
        Top texture alignment.
      • TOP_RIGHT = 2

        public static final int TOP_RIGHT
        Top right texture alignment.
      • LEFT = 3

        public static final int LEFT
        Left texture alignment.
      • CENTER = 4

        public static final int CENTER
        Center texture alignment.
      • RIGHT = 5

        public static final int RIGHT
        Right texture alignment.
      • BOTTOM_LEFT = 6

        public static final int BOTTOM_LEFT
        Bottom left texture alignment.
      • BOTTOM = 7

        public static final int BOTTOM
        Bottom texture alignment.
      • BOTTOM_RIGHT = 8

        public static final int BOTTOM_RIGHT
        Bottom right texture alignment.
      • NONE = 9

        public static final int NONE
        None texture alignment.