ZoomObject

Inheritance: java.lang.Object, com.aspose.slides.Shape, com.aspose.slides.GraphicalObject

All Implemented Interfaces: com.aspose.slides.IZoomObject

public class ZoomObject extends GraphicalObject implements IZoomObject

Represents an Zoom object in a slide.

Methods

MethodDescription
getImageType()Gets or sets the image type of a zoom object.
setImageType(int value)Gets or sets the image type of a zoom object.
getReturnToParent()Gets or sets the navigation behavior in slideshow.
setReturnToParent(boolean value)Gets or sets the navigation behavior in slideshow.
getShowBackground()Gets or sets value that specifies whether the Zoom will use the background of the destination slide.
setShowBackground(boolean value)Gets or sets value that specifies whether the Zoom will use the background of the destination slide.
getZoomImage()Gets or sets image for zoom object.
setZoomImage(IPPImage value)Gets or sets image for zoom object.
getTransitionDuration()Gets or sets the duration of the transition between Zoom and slide.
setTransitionDuration(float value)Gets or sets the duration of the transition between Zoom and slide.

getImageType()

public final int getImageType()

Gets or sets the image type of a zoom object. Read/write ZoomImageType. Default value: Preview


Next example demonstrates changing Image Type to Preview value. 
 In this case current image of a Zoom object changes to slide image:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1), image);
         zoomFrame.setImageType(ZoomImageType.Preview);
     } finally {
         if (fos != null) fos.close();
     }
 } catch(IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Specifies whether the Zoom object is using the slide preview or a cover image.

Returns: int

setImageType(int value)

public final void setImageType(int value)

Gets or sets the image type of a zoom object. Read/write ZoomImageType. Default value: Preview


Next example demonstrates changing Image Type to Preview value. 
 In this case current image of a Zoom object changes to slide image:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1), image);
         zoomFrame.setImageType(ZoomImageType.Preview);
     } finally {
         if (fos != null) fos.close();
     }
 } catch(IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Specifies whether the Zoom object is using the slide preview or a cover image.

Parameters:

ParameterTypeDescription
valueint

getReturnToParent()

public final boolean getReturnToParent()

Gets or sets the navigation behavior in slideshow. Read/write boolean. Default value: false


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setReturnToParent(true);
 } finally {
     if (pres != null) pres.dispose();
 }

True value of the property specifies return to parent navigation behavior in slideshow.

Returns: boolean

setReturnToParent(boolean value)

public final void setReturnToParent(boolean value)

Gets or sets the navigation behavior in slideshow. Read/write boolean. Default value: false


Example:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setReturnToParent(true);
 } finally {
     if (pres != null) pres.dispose();
 }

True value of the property specifies return to parent navigation behavior in slideshow.

Parameters:

ParameterTypeDescription
valueboolean

getShowBackground()

public final boolean getShowBackground()

Gets or sets value that specifies whether the Zoom will use the background of the destination slide. Read/write boolean. Default value: true


the example demonstrates removing the background of an image of a Zoom object:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setShowBackground(false);
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: boolean

setShowBackground(boolean value)

public final void setShowBackground(boolean value)

Gets or sets value that specifies whether the Zoom will use the background of the destination slide. Read/write boolean. Default value: true


the example demonstrates removing the background of an image of a Zoom object:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setShowBackground(false);
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
valueboolean

getZoomImage()

public final IPPImage getZoomImage()

Gets or sets image for zoom object. Read/write IPPImage.


the example demonstrates changing an image of a Zoom object:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         zoomFrame.setImage(image);
     } finally {
         if (fos != null) fos.close();
     }
 } catch(IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Returns: IPPImage

setZoomImage(IPPImage value)

public final void setZoomImage(IPPImage value)

Gets or sets image for zoom object. Read/write IPPImage.


the example demonstrates changing an image of a Zoom object:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
     IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
     FileInputStream fos = null;
     try {
         fos = new FileInputStream("image.png");
         IPPImage image = pres.getImages().addImage(fos);
         zoomFrame.setImage(image);
     } finally {
         if (fos != null) fos.close();
     }
 } catch(IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

ParameterTypeDescription
valueIPPImage

getTransitionDuration()

public final float getTransitionDuration()

Gets or sets the duration of the transition between Zoom and slide. Read/write float. Default value: 1.0f


the example demonstrates changing the duration of the transition between Zoom and slide:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setTransitionDuration(2.5f);
 } finally {
     if (pres != null) pres.dispose();
 }

If not specified (TransitionDur = 0), it will use the destination slide transition and the timings associated with that transition.

Returns: float

setTransitionDuration(float value)

public final void setTransitionDuration(float value)

Gets or sets the duration of the transition between Zoom and slide. Read/write float. Default value: 1.0f


the example demonstrates changing the duration of the transition between Zoom and slide:
 
 Presentation pres = new Presentation("pres.pptx");
 try {
      IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(150, 20, 50, 50, pres.getSlides().get_Item(1));
      zoomFrame.setTransitionDuration(2.5f);
 } finally {
     if (pres != null) pres.dispose();
 }

If not specified (TransitionDur = 0), it will use the destination slide transition and the timings associated with that transition.

Parameters:

ParameterTypeDescription
valuefloat