public interface IPictureFillFormat extends IFillParamSource
Represents a picture fill style.
| Modifier and Type | Method and Description |
|---|---|
boolean |
compressImage(boolean deleteCroppedAreasOfImage,
float resolution)
Compresses the image by reducing its size based on the shape size and specified resolution.
|
boolean |
compressImage(boolean deleteCroppedAreasOfImage,
int resolution)
Compresses the image by reducing its size based on the shape size and specified resolution.
|
IPPImage |
deletePictureCroppedAreas()
Delete cropped areas of the fill Picture.
|
float |
getCropBottom()
Returns or sets the number of percents of real image height that are cropped off
the bottom of the picture.
|
float |
getCropLeft()
Returns or sets the number of percents of real image width that are cropped off
the left of the picture.
|
float |
getCropRight()
Returns or sets the number of percents of real image width that are cropped off
the right of the picture.
|
float |
getCropTop()
Returns or sets the number of percents of real image height that are cropped off
the top of the picture.
|
int |
getDpi()
Returns or sets the dpi which is used to fill a picture.
|
ISlidesPicture |
getPicture()
Returns the picture.
|
int |
getPictureFillMode()
Returns or sets the picture fill mode.
|
float |
getStretchOffsetBottom()
Returns or sets bottom edge of the fill rectangle that is defined by a percentage offset
from the bottom edge of the shape's bounding box.
|
float |
getStretchOffsetLeft()
Returns or sets left edge of the fill rectangle that is defined by a percentage offset
from the left edge of the shape's bounding box.
|
float |
getStretchOffsetRight()
Returns or sets right edge of the fill rectangle that is defined by a percentage offset
from the right edge of the shape's bounding box.
|
float |
getStretchOffsetTop()
Returns or sets top edge of the fill rectangle that is defined by a percentage offset
from the top edge of the shape's bounding box.
|
byte |
getTileAlignment()
Returns or sets how the texture is aligned within the shape.
|
int |
getTileFlip()
Flips the texture tile around its horizontal, vertical or both axis.
|
float |
getTileOffsetX()
Returns or sets the horizontal offset of the texture from the shape's origin in points.
|
float |
getTileOffsetY()
Returns or sets the vertical offset of the texture from the shape's origin in points.
|
float |
getTileScaleX()
Returns or sets the horizontal scale for the texture fill as a percentage.
|
float |
getTileScaleY()
Returns or sets the vertical scale for the texture fill as a percentage.
|
void |
setCropBottom(float value)
Returns or sets the number of percents of real image height that are cropped off
the bottom of the picture.
|
void |
setCropLeft(float value)
Returns or sets the number of percents of real image width that are cropped off
the left of the picture.
|
void |
setCropRight(float value)
Returns or sets the number of percents of real image width that are cropped off
the right of the picture.
|
void |
setCropTop(float value)
Returns or sets the number of percents of real image height that are cropped off
the top of the picture.
|
void |
setDpi(int value)
Returns or sets the dpi which is used to fill a picture.
|
void |
setPictureFillMode(int value)
Returns or sets the picture fill mode.
|
void |
setStretchOffsetBottom(float value)
Returns or sets bottom edge of the fill rectangle that is defined by a percentage offset
from the bottom edge of the shape's bounding box.
|
void |
setStretchOffsetLeft(float value)
Returns or sets left edge of the fill rectangle that is defined by a percentage offset
from the left edge of the shape's bounding box.
|
void |
setStretchOffsetRight(float value)
Returns or sets right edge of the fill rectangle that is defined by a percentage offset
from the right edge of the shape's bounding box.
|
void |
setStretchOffsetTop(float value)
Returns or sets top edge of the fill rectangle that is defined by a percentage offset
from the top edge of the shape's bounding box.
|
void |
setTileAlignment(byte value)
Returns or sets how the texture is aligned within the shape.
|
void |
setTileFlip(int value)
Flips the texture tile around its horizontal, vertical or both axis.
|
void |
setTileOffsetX(float value)
Returns or sets the horizontal offset of the texture from the shape's origin in points.
|
void |
setTileOffsetY(float value)
Returns or sets the vertical offset of the texture from the shape's origin in points.
|
void |
setTileScaleX(float value)
Returns or sets the horizontal scale for the texture fill as a percentage.
|
void |
setTileScaleY(float value)
Returns or sets the vertical scale for the texture fill as a percentage.
|
int getDpi()
Returns or sets the dpi which is used to fill a picture. Read/write int.
void setDpi(int value)
Returns or sets the dpi which is used to fill a picture. Read/write int.
int getPictureFillMode()
Returns or sets the picture fill mode.
Read/write PictureFillMode.
void setPictureFillMode(int value)
Returns or sets the picture fill mode.
Read/write PictureFillMode.
ISlidesPicture getPicture()
Returns the picture.
Read-only ISlidesPicture.
float getCropLeft()
Returns or sets the number of percents of real image width that are cropped off the left of the picture. Read/write float.
void setCropLeft(float value)
Returns or sets the number of percents of real image width that are cropped off the left of the picture. Read/write float.
float getCropTop()
Returns or sets the number of percents of real image height that are cropped off the top of the picture. Read/write float.
void setCropTop(float value)
Returns or sets the number of percents of real image height that are cropped off the top of the picture. Read/write float.
float getCropRight()
Returns or sets the number of percents of real image width that are cropped off the right of the picture. Read/write float.
void setCropRight(float value)
Returns or sets the number of percents of real image width that are cropped off the right of the picture. Read/write float.
float getCropBottom()
Returns or sets the number of percents of real image height that are cropped off the bottom of the picture. Read/write float.
void setCropBottom(float value)
Returns or sets the number of percents of real image height that are cropped off the bottom of the picture. Read/write float.
float getStretchOffsetLeft()
Returns or sets left edge of the fill rectangle that is defined by a percentage offset from the left edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
void setStretchOffsetLeft(float value)
Returns or sets left edge of the fill rectangle that is defined by a percentage offset from the left edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
float getStretchOffsetTop()
Returns or sets top edge of the fill rectangle that is defined by a percentage offset from the top edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
void setStretchOffsetTop(float value)
Returns or sets top edge of the fill rectangle that is defined by a percentage offset from the top edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
float getStretchOffsetRight()
Returns or sets right edge of the fill rectangle that is defined by a percentage offset from the right edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
void setStretchOffsetRight(float value)
Returns or sets right edge of the fill rectangle that is defined by a percentage offset from the right edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
float getStretchOffsetBottom()
Returns or sets bottom edge of the fill rectangle that is defined by a percentage offset from the bottom edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
void setStretchOffsetBottom(float value)
Returns or sets bottom edge of the fill rectangle that is defined by a percentage offset from the bottom edge of the shape's bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset. Read/write float.
IPPImage deletePictureCroppedAreas()
Delete cropped areas of the fill Picture.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the PictureFrame IPictureFrame picFrame = (IPictureFrame)slide.getShapes().get_Item(0); // Deletes cropped areas of the PictureFrame image IPPImage croppedImage = picFrame.getPictureFormat().deletePictureCroppedAreas(); } finally { if (presentation != null) presentation.dispose(); }
boolean compressImage(boolean deleteCroppedAreasOfImage,
int resolution)
Compresses the image by reducing its size based on the shape size and specified resolution. Optionally, it also deletes cropped areas.
The following example demonstrates how to use theCompressImagemethod to reduce the size of an image in a presentation by setting a target resolution and removing cropped areas:Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); IPictureFrame picFrame = (IPictureFrame)slide.getShapes().get_Item(0); // Compress the image with a target resolution of 150 DPI (Web resolution) and remove cropped areas boolean result = picFrame.getPictureFormat().compressImage(true, PicturesCompression.Dpi150); } finally { if (presentation != null) presentation.dispose(); }
deleteCroppedAreasOfImage - If true, the method will remove the cropped areas of the image, potentially further reducing its size.resolution - The target resolution for compression, specified as a value of the PicturesCompression enum.
com.aspose.ms.System.ArgumentException - Thrown when the resolution is not a valid value.boolean compressImage(boolean deleteCroppedAreasOfImage,
float resolution)
Compresses the image by reducing its size based on the shape size and specified resolution. Optionally, it also deletes cropped areas.
The following example demonstrates how to use theCompressImagemethod to reduce the size of an image in a presentation by setting a target resolution and removing cropped areas:Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the PictureFrame IPictureFrame picFrame = (IPictureFrame)slide.getShapes().get_Item(0); // Compress the image with a target resolution of 150 DPI (Web resolution) and remove cropped areas boolean result = picFrame.getPictureFormat().compressImage(true, 150f); // Web resolution } finally { if (presentation != null) presentation.dispose(); }
deleteCroppedAreasOfImage - If true, the method will remove the cropped areas of the image, potentially further reducing its size.resolution - The target resolution in DPI. This value must be positive and defines how the image will be resized.
com.aspose.ms.System.ArgumentException - Thrown when the resolution is not a positive value.float getTileOffsetX()
Returns or sets the horizontal offset of the texture from the shape's origin in points.
A positive value moves the texture to the right, while a negative value moves it to the left.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the horizontal offset of the texture to 20 points pictureFillFormat.setTileOffsetX(20f); } finally { if (presentation != null) presentation.dispose(); }
void setTileOffsetX(float value)
Returns or sets the horizontal offset of the texture from the shape's origin in points.
A positive value moves the texture to the right, while a negative value moves it to the left.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the horizontal offset of the texture to 20 points pictureFillFormat.setTileOffsetX(20f); } finally { if (presentation != null) presentation.dispose(); }
float getTileOffsetY()
Returns or sets the vertical offset of the texture from the shape's origin in points.
A positive value moves the texture down, while a negative value moves it up.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the vertical offset of the texture to -50 points pictureFillFormat.setTileOffsetY(-50); } finally { if (presentation != null) presentation.dispose(); }
void setTileOffsetY(float value)
Returns or sets the vertical offset of the texture from the shape's origin in points.
A positive value moves the texture down, while a negative value moves it up.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the vertical offset of the texture to -50 points pictureFillFormat.setTileOffsetY(-50); } finally { if (presentation != null) presentation.dispose(); }
float getTileScaleX()
Returns or sets the horizontal scale for the texture fill as a percentage.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the horizontal scale for the texture to 120 percents pictureFillFormat.setTileScaleX(120); } finally { if (presentation != null) presentation.dispose(); }
void setTileScaleX(float value)
Returns or sets the horizontal scale for the texture fill as a percentage.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the horizontal scale for the texture to 120 percents pictureFillFormat.setTileScaleX(120); } finally { if (presentation != null) presentation.dispose(); }
float getTileScaleY()
Returns or sets the vertical scale for the texture fill as a percentage.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the vertical scale for the texture to 120 percents pictureFillFormat.setTileScaleY(120); } finally { if (presentation != null) presentation.dispose(); }
void setTileScaleY(float value)
Returns or sets the vertical scale for the texture fill as a percentage.
Read/write float.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the vertical scale for the texture to 120 percents pictureFillFormat.setTileScaleY(120); } finally { if (presentation != null) presentation.dispose(); }
byte getTileAlignment()
Returns or sets how the texture is aligned within the shape. This setting controls the starting point of the texture pattern and how it repeats across the shape.
Read/write RectangleAlignment.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the alignment for the tiling to the right bottom pictureFillFormat.setTileAlignment(RectangleAlignment.BottomRight); } finally { if (presentation != null) presentation.dispose(); }
RectangleAlignment.TopLeft.
void setTileAlignment(byte value)
Returns or sets how the texture is aligned within the shape. This setting controls the starting point of the texture pattern and how it repeats across the shape.
Read/write RectangleAlignment.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Sets the alignment for the tiling to the right bottom pictureFillFormat.setTileAlignment(RectangleAlignment.BottomRight); } finally { if (presentation != null) presentation.dispose(); }
RectangleAlignment.TopLeft.
int getTileFlip()
Flips the texture tile around its horizontal, vertical or both axis.
Read/write TileFlip.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Flips the texture tile around its vertical axis. pictureFillFormat.setTileFlip(TileFlip.FlipY); } finally { if (presentation != null) presentation.dispose(); }
TileFlip.NoFlip.
void setTileFlip(int value)
Flips the texture tile around its horizontal, vertical or both axis.
Read/write TileFlip.
Presentation presentation = new Presentation("demo.pptx"); try { ISlide slide = presentation.getSlides().get_Item(0); // Gets the picture fill format of the shape IPictureFillFormat pictureFillFormat = slide.getShapes().get_Item(0).getFillFormat().getPictureFillFormat(); // Sets the picture fill mode to Tile pictureFillFormat.setPictureFillMode(PictureFillMode.Tile); // Flips the texture tile around its vertical axis. pictureFillFormat.setTileFlip(TileFlip.FlipY); } finally { if (presentation != null) presentation.dispose(); }
TileFlip.NoFlip.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.