Background

Inheritance: java.lang.Object, com.aspose.slides.PVIObject

All Implemented Interfaces: com.aspose.slides.IBackground, com.aspose.slides.IDOMObject

public final class Background extends PVIObject implements IBackground, IDOMObject

Represents background of a slide.

Methods

MethodDescription
getType()Returns a type of background fill.
setType(byte value)Returns a type of background fill.
getFillFormat()Returns a FillFormat for BackgroundType.OwnBackground fill.
getEffectFormat()Returns a EffectFormat for BackgroundType.OwnBackground fill.
getStyleColor()Return a ColorFormat for a BackgroundType.Themed fill.
getStyleIndex()Returns an index of BackgroundType.Themed fill in background theme collection. 0 means no fill. 1..999 - index.
setStyleIndex(int value)Returns an index of BackgroundType.Themed fill in background theme collection. 0 means no fill. 1..999 - index.
getEffective()Gets effective background data with the inheritance applied.
getVersion()
getParent_Immediate()
getSlide()Returns the parent slide of a shape.
getPresentation()Returns the parent presentation of a slide.

getType()

public final byte getType()

Returns a type of background fill. Read/write BackgroundType.

Returns: byte

setType(byte value)

public final void setType(byte value)

Returns a type of background fill. Read/write BackgroundType.

Parameters:

ParameterTypeDescription
valuebyte

getFillFormat()

public final IFillFormat getFillFormat()

Returns a FillFormat for BackgroundType.OwnBackground fill. Read-only IFillFormat.

Returns: IFillFormat

getEffectFormat()

public final IEffectFormat getEffectFormat()

Returns a EffectFormat for BackgroundType.OwnBackground fill. Read-only IEffectFormat.

Returns: IEffectFormat

getStyleColor()

public final IColorFormat getStyleColor()

Return a ColorFormat for a BackgroundType.Themed fill. Read-only IColorFormat.

Returns: IColorFormat

getStyleIndex()

public final int getStyleIndex()

Returns an index of BackgroundType.Themed fill in background theme collection. 0 means no fill. 1..999 - index. Read/write int.

Returns: int

setStyleIndex(int value)

public final void setStyleIndex(int value)

Returns an index of BackgroundType.Themed fill in background theme collection. 0 means no fill. 1..999 - index. Read/write int.

Parameters:

ParameterTypeDescription
valueint

getEffective()

public final IBackgroundEffectiveData getEffective()

Gets effective background data with the inheritance applied.


This example demonstrates getting effective background properties.
 
 Presentation pres = new Presentation("MyPresentation.pptx");
 try
 {
 	IBackgroundEffectiveData effectiveBackground = pres.getSlides().get_Item(0).getBackground().getEffective();
 	System.out.println("Background fill type: " + effectiveBackground.getFillFormat().getFillType());
 	System.out.println("Any effects applied: " + !effectiveBackground.getEffectFormat().isNoEffects());
 } finally {
  if (pres != null) pres.dispose();
 }

Returns: IBackgroundEffectiveData - A IBackgroundEffectiveData.

getVersion()

public long getVersion()

Version. Read-only long.

Returns: long

getParent_Immediate()

public final IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.

Returns: com.aspose.slides.IDOMObject

getSlide()

public final BaseSlide getSlide()

Returns the parent slide of a shape. Read-only IBaseSlide.

Returns: BaseSlide

getPresentation()

public final Presentation getPresentation()

Returns the parent presentation of a slide. Read-only IPresentation.

Returns: Presentation