|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.xssf.usermodel.XSSFShape
org.apache.poi.xssf.usermodel.XSSFPicture
public class XSSFPicture
Represents a picture shape in a SpreadsheetML drawing.
Field Summary |
---|
Fields inherited from class org.apache.poi.xssf.usermodel.XSSFShape |
---|
anchor, drawing, EMU_PER_PIXEL, EMU_PER_POINT, parent, PIXEL_DPI, POINT_DPI |
Constructor Summary | |
---|---|
protected |
XSSFPicture(XSSFDrawing drawing,
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture ctPicture)
Construct a new XSSFPicture object. |
Method Summary | |
---|---|
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture |
getCTPicture()
Return the underlying CTPicture bean that holds all properties for this picture |
protected static java.awt.Dimension |
getImageDimension(PackagePart part,
int type)
Return the dimension of this image |
XSSFPictureData |
getPictureData()
Return picture data for this shape |
XSSFClientAnchor |
getPreferredSize()
Calculate the preferred size for this picture. |
XSSFClientAnchor |
getPreferredSize(double scale)
Calculate the preferred size for this picture. |
protected static int[] |
getResolution(javax.imageio.ImageReader r)
The metadata of PNG and JPEG can contain the width of a pixel in millimeters. |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties |
getShapeProperties()
Returns xml bean with shape properties. |
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture |
prototype()
Returns a prototype that is used to construct new shapes |
void |
resize()
Reset the image to the original size. |
void |
resize(double scale)
Reset the image to the original size. |
protected void |
setPictureReference(PackageRelationship rel)
Link this shape with the picture data |
Methods inherited from class org.apache.poi.xssf.usermodel.XSSFShape |
---|
getAnchor, getDrawing, getParent, isNoFill, setFillColor, setLineStyle, setLineStyleColor, setLineWidth, setNoFill |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XSSFPicture(XSSFDrawing drawing, org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture ctPicture)
XSSFDrawing.createPicture(XSSFClientAnchor, int)
drawing
- the XSSFDrawing that owns this pictureMethod Detail |
---|
protected static org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture prototype()
protected void setPictureReference(PackageRelationship rel)
rel
- relationship referring the picture datapublic org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture getCTPicture()
public void resize()
resize
in interface Picture
public void resize(double scale)
resize
in interface Picture
scale
- the amount by which image dimensions are multiplied relative to the original size.
resize(1.0)
sets the original size, resize(0.5)
resize to 50% of the original,
resize(2.0)
resizes to 200% of the original.public XSSFClientAnchor getPreferredSize()
public XSSFClientAnchor getPreferredSize(double scale)
scale
- the amount by which image dimensions are multiplied relative to the original size.
protected static java.awt.Dimension getImageDimension(PackagePart part, int type)
part
- the package part holding raw picture datatype
- type of the picture: Workbook.PICTURE_TYPE_JPEG
,
Workbook.PICTURE_TYPE_PNG
or Workbook.PICTURE_TYPE_DIB
protected static int[] getResolution(javax.imageio.ImageReader r) throws java.io.IOException
25.4/HorizontalPixelSize
and 25.4/VerticalPixelSize
. Where 25.4 is the number of mm in inch.
{horisontalPdi, verticalDpi}
.
{96, 96} is the default.
java.io.IOException
public XSSFPictureData getPictureData()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getShapeProperties()
XSSFShape
getShapeProperties
in class XSSFShape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |