public class TextureAlignment
Example:
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 int | TOP_LEFT | |
Top left texture alignment.
|
||
static final int | TOP | |
Top texture alignment.
|
||
static final int | TOP_RIGHT | |
Top right texture alignment.
|
||
static final int | LEFT | |
Left texture alignment.
|
||
static final int | CENTER | |
Center texture alignment.
|
||
static final int | RIGHT | |
Right texture alignment.
|
||
static final int | BOTTOM_LEFT | |
Bottom left texture alignment.
|
||
static final int | BOTTOM | |
Bottom texture alignment.
|
||
static final int | BOTTOM_RIGHT | |
Bottom right texture alignment.
|
||
static final int | NONE | |
None texture alignment.
|
public static final int TOP_LEFT
public static final int TOP
public static final int TOP_RIGHT
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BOTTOM_LEFT
public static final int BOTTOM
public static final int BOTTOM_RIGHT
public static final int NONE