Package org.apache.poi.hslf.usermodel
Class HSLFPictureShape
java.lang.Object
org.apache.poi.hslf.usermodel.HSLFShape
org.apache.poi.hslf.usermodel.HSLFSimpleShape
org.apache.poi.hslf.usermodel.HSLFPictureShape
- All Implemented Interfaces:
IAdjustableShape,PictureShape<HSLFShape,,HSLFTextParagraph> PlaceableShape<HSLFShape,,HSLFTextParagraph> Shape<HSLFShape,,HSLFTextParagraph> SimpleShape<HSLFShape,HSLFTextParagraph>
- Direct Known Subclasses:
ActiveXShape,HSLFObjectShape,MovieShape
public class HSLFPictureShape
extends HSLFSimpleShape
implements PictureShape<HSLFShape,HSLFTextParagraph>
Represents a picture in a PowerPoint document.
-
Field Summary
Fields inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
_hyperlink, DEFAULT_LINE_WIDTH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHSLFPictureShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape, HSLFTextParagraph> parent) Create aPictureobjectCreate a newPictureHSLFPictureShape(HSLFPictureData data, ShapeContainer<HSLFShape, HSLFTextParagraph> parent) Create a newPicture -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterInsert(HSLFSheet sh) By default set the orininal image sizeprotected EscherContainerRecordcreateSpContainer(int idx, boolean isChild) Create a new Picture and populate the inital structure of theEscherSprecord which holds information about this picture.Returns the clipping values as percent ratio relatively to the image size.protected EscherBSERecordReturns the picture data for this picture.intReturns index associated with this picture.Name of this picture.voidsetPictureName(String name) Name of this picture.Methods inherited from class org.apache.poi.hslf.usermodel.HSLFSimpleShape
createHyperlink, createSpContainer, getAdjustValue, getFillColor, getGeometry, getHyperlink, getLineBackgroundColor, getLineCap, getLineColor, getLineCompound, getLineDash, getLineDecoration, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getPlaceholder, getPlaceholderDetails, getShadow, getShadowAngle, getShadowColor, getShadowDistance, getStrokeStyle, isPlaceholder, setFillColor, setHyperlink, setLineBackgroundColor, setLineCap, setLineColor, setLineCompound, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setPlaceholder, setStrokeStyleMethods inherited from class org.apache.poi.hslf.usermodel.HSLFShape
draw, getAnchor, getClientData, getClientDataRecord, getClientRecords, getEscherChild, getEscherChild, getEscherChild, getEscherChild, getEscherOptRecord, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getFillStyle, getFlipHorizontal, getFlipVertical, getParent, getRotation, getShapeId, getShapeName, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setFlipHorizontal, setFlipVertical, setRotation, setShapeId, setShapeType, setSheetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValueMethods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotationMethods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheetMethods inherited from interface org.apache.poi.sl.usermodel.SimpleShape
createHyperlink, getFillColor, getFillStyle, getGeometry, getHyperlink, getLineDecoration, getPlaceholder, getPlaceholderDetails, getShadow, getStrokeStyle, isPlaceholder, setFillColor, setPlaceholder, setShapeType, setStrokeStyle
-
Constructor Details
-
HSLFPictureShape
Create a newPicture- Parameters:
data- the picture data
-
HSLFPictureShape
Create a newPicture- Parameters:
data- the picture dataparent- the parent shape
-
HSLFPictureShape
protected HSLFPictureShape(EscherContainerRecord escherRecord, ShapeContainer<HSLFShape, HSLFTextParagraph> parent) Create aPictureobject- Parameters:
escherRecord- theEscherSpContainerrecord which holds information about this picture in theSlideparent- the parent shape of this picture
-
-
Method Details
-
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).
-
createSpContainer
Create a new Picture and populate the inital structure of theEscherSprecord which holds information about this picture.- Parameters:
idx- the index of the picture which refers toEscherBSEcontainer.- Returns:
- the create Picture object
-
getPictureData
Description copied from interface:PictureShapeReturns the picture data for this picture.- Specified by:
getPictureDatain interfacePictureShape<HSLFShape,HSLFTextParagraph> - Returns:
- the picture data for this picture.
-
getEscherBSERecord
-
getPictureName
Name of this picture.- Returns:
- name of this picture
-
setPictureName
Name of this picture.- Parameters:
name- of this picture
-
afterInsert
By default set the orininal image size- Overrides:
afterInsertin classHSLFShape- Parameters:
sh- - owning shape
-
getClipping
Description copied from interface:PictureShapeReturns the clipping values as percent ratio relatively to the image size. The clipping are returned as insets converted/scaled to 100000 (=100%).- Specified by:
getClippingin interfacePictureShape<HSLFShape,HSLFTextParagraph> - Returns:
- the clipping rectangle, which is given in percent in relation to the image width/height
-
getShapeType
- Specified by:
getShapeTypein interfaceSimpleShape<HSLFShape,HSLFTextParagraph> - Overrides:
getShapeTypein classHSLFShape
-