Class HSLFPictureShape

All Implemented Interfaces:
IAdjustableShape, PictureShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>
Direct Known Subclasses:
ActiveXShape, HSLFObjectShape, MovieShape

public class HSLFPictureShape extends HSLFSimpleShape implements PictureShape<HSLFShape,HSLFTextParagraph>
Represents a picture in a PowerPoint document.
  • Constructor Details

  • Method Details

    • getPictureIndex

      public int getPictureIndex()
      Returns index associated with this picture. Index starts with 1 and points to a EscherBSE record which holds information about this picture.
      Returns:
      the index to this picture (1 based).
    • createSpContainer

      protected EscherContainerRecord createSpContainer(int idx, boolean isChild)
      Create a new Picture and populate the inital structure of the EscherSp record which holds information about this picture.
      Parameters:
      idx - the index of the picture which refers to EscherBSE container.
      Returns:
      the create Picture object
    • getPictureData

      public HSLFPictureData getPictureData()
      Description copied from interface: PictureShape
      Returns the picture data for this picture.
      Specified by:
      getPictureData in interface PictureShape<HSLFShape,HSLFTextParagraph>
      Returns:
      the picture data for this picture.
    • getEscherBSERecord

      protected EscherBSERecord getEscherBSERecord()
    • getPictureName

      public String getPictureName()
      Name of this picture.
      Returns:
      name of this picture
    • setPictureName

      public void setPictureName(String name)
      Name of this picture.
      Parameters:
      name - of this picture
    • afterInsert

      protected void afterInsert(HSLFSheet sh)
      By default set the orininal image size
      Overrides:
      afterInsert in class HSLFShape
      Parameters:
      sh - - owning shape
    • getClipping

      public Insets getClipping()
      Description copied from interface: PictureShape
      Returns the clipping values as percent ratio relatively to the image size. The clipping are returned as insets converted/scaled to 100000 (=100%).
      Specified by:
      getClipping in interface PictureShape<HSLFShape,HSLFTextParagraph>
      Returns:
      the clipping rectangle, which is given in percent in relation to the image width/height
    • getShapeType

      public ShapeType getShapeType()
      Specified by:
      getShapeType in interface SimpleShape<HSLFShape,HSLFTextParagraph>
      Overrides:
      getShapeType in class HSLFShape