public interface Picture extends Shape
Modifier and Type | Method and Description |
---|---|
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.
|
getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill
void resize()
resize(double, double)
void resize(double scale)
resize(double, double)
void resize(double scaleX, double scaleY)
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(
resizes to the dimension of the embedded image.
Double.MAX_VALUE
,Double.MAX_VALUE
)
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.ClientAnchor getPreferredSize()
ClientAnchor getPreferredSize(double scaleX, double scaleY)
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.java.awt.Dimension getImageDimension()
PictureData getPictureData()
ClientAnchor getClientAnchor()
Sheet getSheet()
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.