FillFormat
Inheritance: java.lang.Object, com.aspose.slides.PVIObject
All Implemented Interfaces: com.aspose.slides.IFillFormat
public final class FillFormat extends PVIObject implements IFillFormat
Represents a fill formatting options.
Methods
Method | Description |
---|---|
getVersion() | |
getFillType() | Returns or sets the type of filling. |
setFillType(byte value) | Returns or sets the type of filling. |
getSolidFillColor() | Returns the fill color. |
getGradientFormat() | Returns the gradient fill format. |
getPatternFormat() | Returns the pattern fill format. |
getPictureFillFormat() | Returns the picture fill format. |
getRotateWithShape() | Determines whether the fill should be rotated with shape. |
setRotateWithShape(byte value) | Determines whether the fill should be rotated with shape. |
getEffective() | Gets effective fill formatting data with the inheritance applied. |
getVersion()
public long getVersion()
Version. Read-only long.
Returns: long
getFillType()
public final byte getFillType()
Returns or sets the type of filling. Read/write FillType.
Returns: byte
setFillType(byte value)
public final void setFillType(byte value)
Returns or sets the type of filling. Read/write FillType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
getSolidFillColor()
public final IColorFormat getSolidFillColor()
Returns the fill color. Read-only IColorFormat.
Returns: IColorFormat
getGradientFormat()
public final IGradientFormat getGradientFormat()
Returns the gradient fill format. Read-only IGradientFormat.
Returns: IGradientFormat
getPatternFormat()
public final IPatternFormat getPatternFormat()
Returns the pattern fill format. Read-only IPatternFormat.
Returns: IPatternFormat
getPictureFillFormat()
public final IPictureFillFormat getPictureFillFormat()
Returns the picture fill format. Read-only IPictureFillFormat.
Returns: IPictureFillFormat
getRotateWithShape()
public final byte getRotateWithShape()
Determines whether the fill should be rotated with shape. Read/write NullableBool.
Returns: byte
setRotateWithShape(byte value)
public final void setRotateWithShape(byte value)
Determines whether the fill should be rotated with shape. Read/write NullableBool.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
getEffective()
public final IFillFormatEffectiveData getEffective()
Gets effective fill formatting data with the inheritance applied.
This example demonstrates getting shape's effective fill format properties. Presentation pres = new Presentation("MyPresentation.pptx"); try { IFillFormatEffectiveData effectiveFillFormat = pres.getSlides().get_Item(0).getShapes().get_Item(0).getFillFormat().getEffective(); System.out.println("Type: " + effectiveFillFormat.getFillType()); switch (effectiveFillFormat.getFillType()) { case FillType.Solid: System.out.println("Fill color: " + effectiveFillFormat.getSolidFillColor()); break; case FillType.Pattern: System.out.println("Pattern style: " + effectiveFillFormat.getPatternFormat().getPatternStyle()); System.out.println("Fore color: " + effectiveFillFormat.getPatternFormat().getForeColor()); System.out.println("Back color: " + effectiveFillFormat.getPatternFormat().getBackColor()); break; case FillType.Gradient: System.out.println("Gradient direction: " + effectiveFillFormat.getGradientFormat().getGradientDirection()); System.out.println("Gradient stops count: " + effectiveFillFormat.getGradientFormat().getGradientStops().size()); break; case FillType.Picture: System.out.println("Picture width: " + effectiveFillFormat.getPictureFillFormat().getPicture().getImage().getWidth()); System.out.println("Picture height: " + effectiveFillFormat.getPictureFillFormat().getPicture().getImage().getHeight()); break; } } finally { if (pres != null) pres.dispose(); }
Returns: IFillFormatEffectiveData - A IFillFormatEffectiveData.