public abstract class SlidesBaseSlide extends DocumentPart
Provides the abstract base class for slides of all types in a PowerPoint document.
Modifier and Type | Method and Description |
---|---|
void |
addImageWatermark(ImageWatermark watermark,
SlidesImageEffects effects)
Adds an image watermark to the slide.
|
void |
addImageWatermark(ImageWatermark watermark,
SlidesImageEffects effects,
SlidesShapeSettings shapeSettings)
Adds an image watermark to the slide.
|
void |
addTextWatermark(TextWatermark watermark,
SlidesTextEffects effects)
Adds a text watermark to the slide.
|
void |
addTextWatermark(TextWatermark watermark,
SlidesTextEffects effects,
SlidesShapeSettings shapeSettings)
Adds a text watermark to the slide.
|
void |
addWatermark(Watermark watermark,
SlidesShapeSettings shapeSettings)
Adds a watermark to the slide.
|
SlidesChartCollection |
getCharts()
Gets the collection of all charts on the slide.
|
SlidesImageFillFormat |
getImageFillFormat()
Gets the image fill format settings of the slide.
|
SlidesShapeCollection |
getShapes()
Gets the collection of all shapes of the slide.
|
addWatermark, findImages, findImages, findWatermarks, findWatermarks
public final SlidesShapeCollection getShapes()
Gets the collection of all shapes of the slide.
public final SlidesChartCollection getCharts()
Gets the collection of all charts on the slide.
public final SlidesImageFillFormat getImageFillFormat()
Gets the image fill format settings of the slide.
This example demonstrates how to set the background image for a slide.
SlidesDocument document = Document.load(SlidesDocument.class, "D:\\input.pptx"); File file = new File("D:\\image.jpg"); byte[] imageBytes = new byte[(int)file.length()]; InputStream inputStream = new FileInputStream(file); inputStream.read(imageBytes); inputStream.close(); SlidesSlide slide = document.getSlides().get_Item(0); slide.getImageFillFormat().setBackgroundImage(new SlidesWatermarkableImage(imageBytes)); slide.getImageFillFormat().setTileAsTexture(true); slide.getImageFillFormat().setTransparency(0.5); document.save("D:\\output.pptx"); document.close();
public final void addWatermark(Watermark watermark, SlidesShapeSettings shapeSettings)
Adds a watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The watermark to add to the slide.shapeSettings
- Settings that should be applied to the watermark.public final void addImageWatermark(ImageWatermark watermark, SlidesImageEffects effects, SlidesShapeSettings shapeSettings)
Adds an image watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The image watermark to add to the slide.effects
- Image effects that should be applied to the watermark.shapeSettings
- Shape settings that should be applied to the watermark.public final void addImageWatermark(ImageWatermark watermark, SlidesImageEffects effects)
Adds an image watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The image watermark to add to the slide.effects
- Image effects that should be applied to the watermark.public final void addTextWatermark(TextWatermark watermark, SlidesTextEffects effects, SlidesShapeSettings shapeSettings)
Adds a text watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the slide.effects
- Text effects that should be applied to the watermark.shapeSettings
- Shape settings that should be applied to the watermark.public final void addTextWatermark(TextWatermark watermark, SlidesTextEffects effects)
Adds a text watermark to the slide. This method assumes that watermark offset and size are measured in points (if they are assigned).
watermark
- The text watermark to add to the slide.effects
- Text effects that should be applied to the watermark.Copyright © 2018. All rights reserved.