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.ss.usermodel
Interface Picture

All Superinterfaces:
  Shape

All Known Implementing Classes:
  HSSFObjectData, HSSFPicture, SXSSFPicture, XSSFPicture

    public interface Picture

extends Shape

Repersents a picture in a SpreadsheetML document

Method Summary
`ClientAnchor` | `getClientAnchor()`
`java.awt.Dimension` | `getImageDimension()` Return the dimension of the embedded image in pixel
`PictureData` | `getPictureData()` Return picture data for this picture
`ClientAnchor` | `getPreferredSize()` Calculate the preferred size for this picture.
`ClientAnchor` | `getPreferredSize(double scaleX, double scaleY)` Calculate the preferred size for this picture.
`Sheet` | `getSheet()`
`void` | `resize()` Reset the image to the dimension of the embedded image
`void` | `resize(double scale)` Resize the image proportionally.
`void` | `resize(double scaleX, double scaleY)` Resize the image.

Methods inherited from interface org.apache.poi.ss.usermodel.Shape
`getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill`

Method Detail

### resize

    void resize()

  Reset the image to the dimension of the embedded image

  See Also:
    `resize(double, double)`

### resize

    void resize(double scale)

  Resize the image proportionally.

  See Also:
    `resize(double, double)`

### resize

    void resize(double scaleX,
                double scaleY)

  Resize the image.

  Please note, that this method works correctly only for workbooks with the default font size (Arial 10pt for .xls and Calibri 11pt for .xlsx). If the default font is changed the resized image can be streched vertically or horizontally.

  `resize(1.0,1.0)` keeps the original size,
  `resize(0.5,0.5)` resize to 50% of the original,
  `resize(2.0,2.0)` resizes to 200% of the original.
  `resize(`Double.MAX_VALUE`,`Double.MAX_VALUE`)` resizes to the dimension of the embedded image.

  Parameters:
    `scaleX` - the amount by which the image width is multiplied relative to the original width.
    `scaleY` - the amount by which the image height is multiplied relative to the original height.

### getPreferredSize

    ClientAnchor getPreferredSize()

  Calculate the preferred size for this picture.

  Returns:
    XSSFClientAnchor with the preferred size for this image

### getPreferredSize

    ClientAnchor getPreferredSize(double scaleX,
                                  double scaleY)

  Calculate the preferred size for this picture.

  Parameters:
    `scaleX` - the amount by which image width is multiplied relative to the original width.
    `scaleY` - the amount by which image height is multiplied relative to the original height.
  Returns:
    ClientAnchor with the preferred size for this image

### getImageDimension

    java.awt.Dimension getImageDimension()

  Return the dimension of the embedded image in pixel

  Returns:
    image dimension in pixels

### getPictureData

    PictureData getPictureData()

  Return picture data for this picture

  Returns:
    picture data for this picture

### getClientAnchor

    ClientAnchor getClientAnchor()

  Returns:
    the anchor that is used by this picture

### getSheet

    Sheet getSheet()

  Returns:
    the sheet which contains the picture

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.