Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hslf.usermodel
Class HSLFPictureShape

    java.lang.Object
      org.apache.poi.hslf.usermodel.HSLFShape
          org.apache.poi.hslf.usermodel.HSLFSimpleShape
              org.apache.poi.hslf.usermodel.HSLFPictureShape

All Implemented Interfaces:
  IAdjustableShape, PictureShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>

Direct Known Subclasses:
  ActiveXShape, MovieShape, OLEShape

    public class HSLFPictureShape

extends HSLFSimpleShape
implements PictureShape<HSLFShape,HSLFTextParagraph>

Represents a picture in a PowerPoint document.

Field Summary

Fields inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
`_hyperlink, DEFAULT_LINE_WIDTH`

Constructor Summary
`protected` | `HSLFPictureShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)` Create a `Picture` object
`` | `HSLFPictureShape(HSLFPictureData data)` Create a new `Picture`
`` | `HSLFPictureShape(HSLFPictureData data, ShapeContainer<HSLFShape,HSLFTextParagraph> parent)` Create a new `Picture`

Method Summary
`protected void` | `afterInsert(HSLFSheet sh)` By default set the orininal image size
`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.
`java.awt.Insets` | `getClipping()` Returns the clipping values as percent ratio relatively to the image size.
`protected EscherBSERecord` | `getEscherBSERecord()`
`HSLFPictureData` | `getPictureData()` Returns the picture data for this picture.
`int` | `getPictureIndex()` Returns index associated with this picture.
`java.lang.String` | `getPictureName()` Name of this picture.
`ShapeType` | `getShapeType()`
`void` | `setPictureName(java.lang.String name)` Name of this picture.

Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
`createHyperlink, createSpContainer, getAdjustValue, getFillColor, getGeometry, getHyperlink, getLineBackgroundColor, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getPlaceholder, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, setFillColor, setHyperlink, setLineBackgroundColor, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setPlaceholder, setStrokeStyle`

Methods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
`draw, getAnchor, getClientData, getClientDataRecord, getClientRecords, getEscherChild, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, isPlaceholder, moveTo, setAnchor, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType, setSheet`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
`createHyperlink, getFillColor, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getShadow, getStrokeStyle, setFillColor, setPlaceholder, setShapeType, setStrokeStyle`

Methods inherited from interface org.apache.poi.sl.usermodel.Shape
`draw, getAnchor, getParent, getSheet`

Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
`getAdjustValue`

Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
`getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation`

Constructor Detail

### HSLFPictureShape

    public HSLFPictureShape(HSLFPictureData data)

  Create a new `Picture`

  Parameters:
    `data` - the picture data

### HSLFPictureShape

    public HSLFPictureShape(HSLFPictureData data,
                            ShapeContainer<HSLFShape,HSLFTextParagraph> parent)

  Create a new `Picture`

  Parameters:
    `data` - the picture data
    `parent` - the parent shape

### HSLFPictureShape

    protected HSLFPictureShape(EscherContainerRecord escherRecord,
                               ShapeContainer<HSLFShape,HSLFTextParagraph> parent)

  Create a `Picture` object

  Parameters:
    `escherRecord` - the `EscherSpContainer` record which holds information about this picture in the `Slide`
    `parent` - the parent shape of this picture

Method Detail

### 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 java.lang.String getPictureName()

  Name of this picture.

  Returns:
    name of this picture

### setPictureName

    public void setPictureName(java.lang.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 java.awt.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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.