TextureAlignment
Contents
[
Hide
]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
Field | Description |
---|---|
BOTTOM | Bottom texture alignment. |
BOTTOM_LEFT | Bottom left texture alignment. |
BOTTOM_RIGHT | Bottom right texture alignment. |
CENTER | Center texture alignment. |
LEFT | Left texture alignment. |
NONE | None texture alignment. |
RIGHT | Right texture alignment. |
TOP | Top texture alignment. |
TOP_LEFT | Top left texture alignment. |
TOP_RIGHT | Top right texture alignment. |
length |
Methods
Method | Description |
---|---|
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.
RIGHT
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:
Parameter | Type | Description |
---|---|---|
textureAlignmentName | java.lang.String |
Returns: int
getName(int textureAlignment)
public static String getName(int textureAlignment)
Parameters:
Parameter | Type | Description |
---|---|---|
textureAlignment | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int textureAlignment)
public static String toString(int textureAlignment)
Parameters:
Parameter | Type | Description |
---|---|---|
textureAlignment | int |
Returns: java.lang.String