java.lang.Object
com.aspose.words.FillType
public class FillType
- extends java.lang.Object
Utility class containing constants.
Specifies fill type for a fillable object.
Example:
Shows how to convert any of the fills back to solid fill.
Document doc = new Document(getMyDir() + "Two color gradient.docx");
// Get Fill object for Font of the first Run.
Fill fill = doc.getFirstSection().getBody().getParagraphs().get(0).getRuns().get(0).getFont().getFill();
// Check Fill properties of the Font.
System.out.println(MessageFormat.format("The type of the fill is: {0}",fill.getFillType()));
System.out.println(MessageFormat.format("The foreground color of the fill is: {0}",fill.getForeColor()));
System.out.println(MessageFormat.format("The fill is transparent at {0}%",fill.getTransparency() * 100.0));
// Change type of the fill to Solid with uniform green color.
fill.solid(Color.GREEN);
System.out.println("\nThe fill is changed:");
System.out.println(MessageFormat.format("The type of the fill is: {0}",fill.getFillType()));
System.out.println(MessageFormat.format("The foreground color of the fill is: {0}",fill.getForeColor()));
System.out.println(MessageFormat.format("The fill transparency is {0}%",fill.getTransparency() * 100.0));
doc.save(getArtifactsDir() + "Drawing.FillSolid.docx");
|
Field Summary |
static final int | SOLID = 1 | |
|
Solid fill.
|
static final int | PATTERNED = 2 | |
|
Patterned fill.
|
static final int | GRADIENT = 3 | |
|
Gradient fill.
|
static final int | TEXTURED = 4 | |
|
Textured fill.
|
static final int | BACKGROUND = 5 | |
|
Fill is the same as the background.
|
static final int | PICTURE = 6 | |
|
Picture fill.
|
SOLID = 1 | |
public static final int SOLID |
-
Solid fill.
PATTERNED = 2 | |
public static final int PATTERNED |
-
Patterned fill.
GRADIENT = 3 | |
public static final int GRADIENT |
-
Gradient fill.
TEXTURED = 4 | |
public static final int TEXTURED |
-
Textured fill.
BACKGROUND = 5 | |
public static final int BACKGROUND |
-
Fill is the same as the background.
PICTURE = 6 | |
public static final int PICTURE |
-
Picture fill.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.