TextureAlignment

Inheritance: java.lang.Object

public class TextureAlignment

Specifies the alignment for the tiling of the texture fill.

Examples:

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);
 

Fields

FieldDescription
BOTTOMBottom texture alignment.
BOTTOM_LEFTBottom left texture alignment.
BOTTOM_RIGHTBottom right texture alignment.
CENTERCenter texture alignment.
LEFTLeft texture alignment.
NONENone texture alignment.
RIGHTRight texture alignment.
TOPTop texture alignment.
TOP_LEFTTop left texture alignment.
TOP_RIGHTTop right texture alignment.
length

Methods

MethodDescription
fromName(String textureAlignmentName)
getName(int textureAlignment)
getValues()
toString(int textureAlignment)

BOTTOM

public static int BOTTOM

Bottom texture alignment.

BOTTOM_LEFT

public static int BOTTOM_LEFT

Bottom left texture alignment.

BOTTOM_RIGHT

public static int BOTTOM_RIGHT

Bottom right texture alignment.

CENTER

public static int CENTER

Center texture alignment.

LEFT

public static int LEFT

Left texture alignment.

NONE

public static int NONE

None texture alignment.

public static int RIGHT

Right texture alignment.

TOP

public static int TOP

Top texture alignment.

TOP_LEFT

public static int TOP_LEFT

Top left texture alignment.

TOP_RIGHT

public static int TOP_RIGHT

Top right texture alignment.

length

public static int length

fromName(String textureAlignmentName)

public static int fromName(String textureAlignmentName)

Parameters:

ParameterTypeDescription
textureAlignmentNamejava.lang.String

Returns: int

getName(int textureAlignment)

public static String getName(int textureAlignment)

Parameters:

ParameterTypeDescription
textureAlignmentint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int textureAlignment)

public static String toString(int textureAlignment)

Parameters:

ParameterTypeDescription
textureAlignmentint

Returns: java.lang.String