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.model
Class Picture

    java.lang.Object
      org.apache.poi.hslf.model.Shape
          org.apache.poi.hslf.model.SimpleShape
              org.apache.poi.hslf.model.Picture

Direct Known Subclasses:
  ActiveXShape, MovieShape, OLEShape

    public class Picture

extends SimpleShape

Represents a picture in a PowerPoint document.

Author:
  Yegor Kozlov

Field Summary
`static byte` | `DIB` Windows DIB (BMP)
`static int` | `EMF` Windows Enhanced Metafile (EMF)
`static int` | `JPEG` JPEG
`static int` | `PICT` Macintosh PICT
`static int` | `PNG` PNG
`static int` | `WMF` Windows Metafile (WMF)

Fields inherited from class org.apache.poi.hslf.model.SimpleShape
`DEFAULT_LINE_WIDTH`

Fields inherited from class org.apache.poi.hslf.model.Shape
`EMU_PER_CENTIMETER, EMU_PER_INCH, EMU_PER_POINT, MASTER_DPI, PIXEL_DPI, POINT_DPI`

Constructor Summary
`Picture(int idx)` Create a new `Picture`
`Picture(int idx, Shape parent)` Create a new `Picture`

Method Summary
`void` | `draw(java.awt.Graphics2D graphics)`
`PictureData` | `getPictureData()` Returns the picture data for this picture.
`int` | `getPictureIndex()` Returns index associated with this picture.
`java.lang.String` | `getPictureName()` Name of this picture.
`void` | `setDefaultSize()` Resize this picture to the default size.
`void` | `setPictureName(java.lang.String name)` Name of this picture.

Methods inherited from class org.apache.poi.hslf.model.SimpleShape
`getFillColor, getFlipHorizontal, getFlipVertical, getLineColor, getLineDashing, getLineStyle, getLineWidth, getLogicalAnchor2D, getRotation, setFillColor, setHyperlink, setLineColor, setLineDashing, setLineStyle, setLineWidth, setRotation`

Methods inherited from class org.apache.poi.hslf.model.Shape
`getAnchor, getAnchor2D, getEscherChild, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getHyperlink, getOutline, getParent, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setShapeId, setShapeType, setSheet`

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

Field Detail

### EMF

    public static final int EMF

  Windows Enhanced Metafile (EMF)

  See Also:
    Constant Field Values

### WMF

    public static final int WMF

  Windows Metafile (WMF)

  See Also:
    Constant Field Values

### PICT

    public static final int PICT

  Macintosh PICT

  See Also:
    Constant Field Values

### JPEG

    public static final int JPEG

  JPEG

  See Also:
    Constant Field Values

### PNG

    public static final int PNG

  PNG

  See Also:
    Constant Field Values

### DIB

    public static final byte DIB

  Windows DIB (BMP)

  See Also:
    Constant Field Values

Constructor Detail

### Picture

    public Picture(int idx)

  Create a new `Picture`

  Parameters:
    `idx` - the index of the picture

### Picture

    public Picture(int idx,
                   Shape parent)

  Create a new `Picture`

  Parameters:
    `idx` - the index of the picture
    `parent` - the parent shape

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).

### setDefaultSize

    public void setDefaultSize()

  Resize this picture to the default size. For PNG and JPEG resizes the image to 100%, for other types sets the default size of 200x200 pixels.

### getPictureData

    public PictureData getPictureData()

  Returns the picture data for this picture.

  Returns:
    the picture data for this picture.

### 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

### draw

    public void draw(java.awt.Graphics2D graphics)

  Overrides:
    `draw` in class `SimpleShape`

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