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.
(scaleX - 图像宽度与原始宽度相乘的数量。)
scaleY
- the amount by which the image height is multiplied relative to the original height.
(scaleY - 图像高度相对于原始高度的乘积。)
ClientAnchor getPreferredSize()
ClientAnchor getPreferredSize(double scaleX, double scaleY)
scaleX
- the amount by which image width is multiplied relative to the original width.
(scaleX - 图像宽度与原始宽度相乘的数量。)
scaleY
- the amount by which image height is multiplied relative to the original height.
(scaleY - 图像高度相对于原始高度的乘积量。)
java.awt.Dimension getImageDimension()
PictureData getPictureData()
ClientAnchor getClientAnchor()
Sheet getSheet()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.