aspose.cells

Class Picture

Encapsulates the object that represents a single picture in a spreadsheet.

Example:

$workbook = new cells\Workbook();
//Adding a new worksheet to the $workbook object
$sheetIndex = $workbook->getWorksheets()->add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
$worksheet = $workbook->getWorksheets()->get($sheetIndex);
//Adding a picture at the location of a cell whose row and column indices
//are 5 in the worksheet-> It is "F6" cell
$worksheet->getPictures()->add(5, 5, "image.png");

Property Getters/Setters Summary
functiongetActualLowerRightRow()
Get the actual bottom row.
functiongetAlternativeText()
function
           Returns or sets the descriptive (alternative) text string of the Shape object.
functiongetAnchorType()
function
           Gets and set the type of the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.
functiongetAutoShapeType()
function
           Gets and sets the auto shape type. The value of the property is AutoShapeType integer constant.
functiongetBorderLineColor()
function
           Represents the com.aspose.cells.Color of the border line of a picture.
functiongetBorderWeight()
function
           Gets or sets the weight of the border line of a picture in units of pt.
functiongetBottom()
function
setBottom(value)
           Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
functiongetControlData()
Gets the data of control.
functiongetCreateId()
function
           Gets and sets create id for this shape.
functiongetData()
function
setData(value)
           Gets the data of the picture.
functiongetDisplayAsIcon()
function
           True if the specified object is displayed as an icon and the image will not be auto changed.
functiongetFill()
Returns a FillFormat object that contains fill formatting properties for the specified shape.
functiongetFillFormat()
Returns a MsoFillFormat object that contains fill formatting properties for the specified shape.
functiongetFont()
function
setFont(value)
           Represents the font of shape.
functiongetFormatPicture()
Gets and sets the options of the picture format.
functiongetFormula()
function
setFormula(value)
           Gets and sets the data of the formula.
functiongetGeometry()
Gets the geometry
functiongetGlow()
Represents a GlowEffect object that specifies glow effect for the chart element or shape.
functiongetGroup()
Gets the group shape which contains this shape.
functionhasLine()
function
setHasLine(value)
           Gets and sets the line border of the shape is visible.
functiongetHeight()
function
setHeight(value)
           Represents the height of shape, in unit of pixel.
functiongetHeightCM()
function
           Represents the height of the shape, in unit of centimeters.
functiongetHeightInch()
function
           Represents the height of the shape, in unit of inches.
functiongetHeightInShape()
function
           Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..
functiongetHeightPt()
function
           Represents the height of the shape, in unit of points.
functiongetHeightScale()
function
           Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
functiongetHtmlText()
function
           Gets and sets the html string which contains data and some formats in this textbox.
functiongetHyperlink()
Gets the hyperlink of the shape.
functiongetId()
Gets the identifier of this shape.
functiongetImageType()
Gets the image format of the picture. The value of the property is ImageType integer constant.
functiongetInputRange()
function
           Gets or sets the worksheet range used to fill the specified combo box.
functionisAspectRatioLocked()
function
           True means that aspect ratio of the shape is locked.
functionisAutoSize()
function
           True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.
functionisDynamicDataExchange()
function
           Gets or sets whether dynamic data exchange
functionisEquation()
Indicates whether the shape only contains an equation.
functionisFilled()
function
setFilled(value)
           Indicates whether the fill format is visible.
functionisFlippedHorizontally()
function
           Gets and sets whether shape is horizontally flipped .
functionisFlippedVertically()
function
           Gets and sets whether shape is vertically flipped .
functionisGroup()
Indicates whether this shape is a group shape.
functionisHidden()
function
setHidden(value)
           Indicates whether the object is visible.
functionisInGroup()
Indicates whether the shape is grouped.
functionisLink()
function
setLink(value)
           Returns true if the picture is linked to a file.
functionisLockAspectRatio()
function
           True means that aspect ratio of the shape is locked.
functionisLocked()
function
setLocked(value)
           True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.
functionisPrintable()
function
           Indicates whether the object is printable. If False, this shape will not be printed when printing.
functionisRichText()
Whether or not the text is rich text.
functionisSmartArt()
Indicates whether the shape is a smart art.
functionisTextWrapped()
function
           Gets and sets the text wrapped type of the shape which contains text.
functionisWordArt()
Indicates whether this shape is a word art.
functiongetLeft()
function
setLeft(value)
           Represents the horizontal offset of shape from its left column, in unit of pixels.
functiongetLeftCM()
function
setLeftCM(value)
           Represents the horizontal offset of shape from its left column, in unit of centimeters.
functiongetLeftInch()
function
           Represents the horizontal offset of shape from its left column, in unit of inches.
functiongetLeftInShape()
function
           Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
functiongetLeftToCorner()
function
           Gets and sets the horizonal offset of shape from worksheet left border.
functiongetLine()
Gets line style
functiongetLineFormat()
Returns a MsoLineFormat object that contains line formatting properties for the specified shape.
functiongetLinkedCell()
function
           Gets or sets the worksheet range linked to the control's value.
functiongetLowerDeltaX()
function
           Gets or sets the shape's horizontal offset from its lower right corner column.
functiongetLowerDeltaY()
function
           Gets or sets the shape's vertical offset from its lower right corner row.
functiongetLowerRightColumn()
function
           Represents lower right corner column index.
functiongetLowerRightRow()
function
           Represents lower right corner row index.
functiongetMacroName()
function
           Gets and sets the name of macro.
functiongetMsoDrawingType()
Gets drawing type. The value of the property is MsoDrawingType integer constant.
functiongetName()
function
setName(value)
           Gets and sets the name of the shape.
functiongetOriginalHeight()
Gets the original height of the picture.
functiongetOriginalHeightCM()
Gets the original height of picture, in unit of centimeters.
functiongetOriginalHeightInch()
Gets the original height of picture, in unit of inches.
functiongetOriginalWidth()
Gets the original width of the picture.
functiongetOriginalWidthCM()
Gets the original width of picture, in unit of centimeters.
functiongetOriginalWidthInch()
Gets the original width of picture, in unit of inches.
functiongetPaths()
Gets the paths of a custom geometric shape.
functiongetPlacement()
function
           Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. The value of the property is PlacementType integer constant.
functiongetReflection()
Represents a ReflectionEffect object that specifies reflection effect for the chart element or shape.
functiongetRelativeToOriginalPictureSize()
function
           Indicates whether shape is relative to original picture size.
functiongetRight()
function
setRight(value)
           Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
functiongetRotationAngle()
function
           Gets and sets the rotation of the shape.
functiongetShadowEffect()
Represents a ShadowEffect object that specifies shadow effect for the chart element or shape.
functiongetSignatureLine()
function
           Gets and sets the signature line
functiongetSoftEdges()
function
           Gets and sets the radius of blur to apply to the edges, in unit of points.
functiongetSourceFullName()
function
           Gets or sets the path and name of the source file for the linked image.
functiongetSpid()
Specifies an optional string identifier that an application can use to identify the particular shape.
functiongetSpt()
Specifies an optional number that an application can use to associate the particular shape with a defined shape type.
functiongetText()
function
setText(value)
           Gets and sets the text of this shape.
functiongetTextBody()
Gets and sets the setting of the shape's text.
functiongetTextDirection()
function
           Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.
functiongetTextEffect()
Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.
functiongetTextHorizontalAlignment()
function
           Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.
functiongetTextHorizontalOverflow()
function
           Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
functiongetTextOptions()
function
           Represents the text options of the shape.
functiongetTextOrientationType()
function
           Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
functiongetTextShapeType()
function
           Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
functiongetTextVerticalAlignment()
function
           Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.
functiongetTextVerticalOverflow()
function
           Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
functiongetThreeDFormat()
Gets and sets 3d format of the shape.
functiongetTitle()
function
setTitle(value)
           Specifies the title (caption) of the current shape object.
functiongetTop()
function
setTop(value)
           Represents the vertical offset of shape from its top row, in unit of pixels.
functiongetTopCM()
function
setTopCM(value)
           Represents the vertical offset of shape from its top row, in unit of centimeters.
functiongetTopInch()
function
setTopInch(value)
           Represents the vertical offset of shape from its top row, in unit of inches.
functiongetTopInShape()
function
           Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.
functiongetTopToCorner()
function
           Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
functiongetType()
Gets the auto shape type. The value of the property is AutoShapeType integer constant.
functiongetUpperDeltaX()
function
           Gets or sets the shape's horizontal offset from its upper left corner column.
functiongetUpperDeltaY()
function
           Gets or sets the shape's vertical offset from its upper left corner row.
functiongetUpperLeftColumn()
function
           Represents upper left corner column index.
functiongetUpperLeftRow()
function
           Represents the top row index.
functiongetWidth()
function
setWidth(value)
           Represents the width of shape, in unit of pixels.
functiongetWidthCM()
function
setWidthCM(value)
           Represents the width of the shape, in unit of centimeters.
functiongetWidthInch()
function
           Represents the width of the shape, in unit of inch.
functiongetWidthInShape()
function
           Represents the width of the shape, in unit of 1/4000 of the parent shape.
functiongetWidthPt()
function
setWidthPt(value)
           Represents the width of the shape, in unit of point.
functiongetWidthScale()
function
           Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
functiongetWorksheet()
Gets the Worksheet object which contains this shape.
functiongetX()
function
setX(value)
           Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
functiongetY()
function
setY(value)
           Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
functiongetZOrderPosition()
function
           Returns the position of a shape in the z-order.
 
Method Summary
functionaddHyperlink(address)
Adds a hyperlink to the shape.
functionalignTopRightCorner(topRow, rightColumn)
Moves the picture to the top-right corner.
functioncalculateTextSize()
Recalculate the text area
functioncharacters(startIndex, length)
Returns a Characters object that represents a range of characters within the text.
functioncopy(source, options)
Copy the picture.
functionformatCharacters(startIndex, length, font, flag)
Formats some characters with the font setting.
functiongetActualBox()
Get the actual position and size of the shape (after applying rotation, flip, etc.)
functiongetCharacters()
Returns all Characters objects that represents a range of characters within the text .
functiongetConnectionPoints()
Get the connection points
functiongetInputRange(isR1C1, isLocal)
Gets the range used to fill the control.
functiongetLinkedCell(isR1C1, isLocal)
Gets the range linked to the control's value.
functiongetLockedProperty(type)
Gets the value of locked property.
functiongetResultOfSmartArt()
Converting smart art to grouped shapes.
functiongetRichFormattings()
Returns all Characters objects that represents a range of characters within the text .
functionisSameSetting(obj)
Returns whether the shape is same.
functionmove(upperLeftRow, upperLeftColumn)
Moves the picture to a specified location.
functionmoveToRange(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
Moves the shape to a specified range.
functionremoveActiveXControl()
Remove activeX control.
functionremoveHyperlink()
Removes the hyperlink of the shape.
functionsetInputRange(formula, isR1C1, isLocal)
Sets the range used to fill the control.
functionsetLinkedCell(formula, isR1C1, isLocal)
Sets the range linked to the control's value.
functionsetLockedProperty(type, value)
Set the locked property.
functiontoFrontOrBack(orders)
Brings the shape to the front or sends the shape to back.
functiontoImage(imageFile, options)
Saves the shape to a file.
functionupdateSelectedValue()
Update the selected value by the value of the linked cell.
 

    • Property Getters/Setters Detail

      • getOriginalHeight : Number 

        function getOriginalHeight()
        
        Gets the original height of the picture.
      • getOriginalWidth : Number 

        function getOriginalWidth()
        
        Gets the original width of the picture.
      • getBorderLineColor/setBorderLineColor : Color 

        function getBorderLineColor() / function setBorderLineColor(value)
        
        Represents the com.aspose.cells.Color of the border line of a picture.
      • getBorderWeight/setBorderWeight : Number 

        function getBorderWeight() / function setBorderWeight(value)
        
        Gets or sets the weight of the border line of a picture in units of pt.
      • getData/setData : byte[] 

        function getData() / function setData(value)
        
        Gets the data of the picture.
      • getSourceFullName/setSourceFullName : String 

        function getSourceFullName() / function setSourceFullName(value)
        
        Gets or sets the path and name of the source file for the linked image. The default value is an empty string. If SourceFullName is not an empty string, the image is linked. If SourceFullName is not an empty string, but Data is null, then the image is linked and not stored in the file.
      • getFormula/setFormula : String 

        function getFormula() / function setFormula(value)
        
        Gets and sets the data of the formula.
      • isAutoSize/setAutoSize : boolean 

        function isAutoSize() / function setAutoSize(value)
        
        True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.
      • isLink/setLink : boolean 

        function isLink() / function setLink(value)
        
        Returns true if the picture is linked to a file.
      • isDynamicDataExchange/setDynamicDataExchange : boolean 

        function isDynamicDataExchange() / function setDynamicDataExchange(value)
        
        Gets or sets whether dynamic data exchange
      • getDisplayAsIcon/setDisplayAsIcon : boolean 

        function getDisplayAsIcon() / function setDisplayAsIcon(value)
        
        True if the specified object is displayed as an icon and the image will not be auto changed.
      • getImageType : Number 

        function getImageType()
        
        Gets the image format of the picture. The value of the property is ImageType integer constant.
      • getOriginalHeightCM : Number 

        function getOriginalHeightCM()
        
        Gets the original height of picture, in unit of centimeters.
      • getOriginalWidthCM : Number 

        function getOriginalWidthCM()
        
        Gets the original width of picture, in unit of centimeters.
      • getOriginalHeightInch : Number 

        function getOriginalHeightInch()
        
        Gets the original height of picture, in unit of inches.
      • getOriginalWidthInch : Number 

        function getOriginalWidthInch()
        
        Gets the original width of picture, in unit of inches.
      • getSignatureLine/setSignatureLine : SignatureLine 

        function getSignatureLine() / function setSignatureLine(value)
        
        Gets and sets the signature line
      • getMacroName/setMacroName : String 

        function getMacroName() / function setMacroName(value)
        
        Gets and sets the name of macro.
      • isEquation : boolean 

        function isEquation()
        
        Indicates whether the shape only contains an equation.
      • isSmartArt : boolean 

        function isSmartArt()
        
        Indicates whether the shape is a smart art. Only for ooxml file.
      • getZOrderPosition/setZOrderPosition : Number 

        function getZOrderPosition() / function setZOrderPosition(value)
        
        Returns the position of a shape in the z-order.
      • getName/setName : String 

        function getName() / function setName(value)
        
        Gets and sets the name of the shape.
      • getAlternativeText/setAlternativeText : String 

        function getAlternativeText() / function setAlternativeText(value)
        
        Returns or sets the descriptive (alternative) text string of the Shape object.
      • getTitle/setTitle : String 

        function getTitle() / function setTitle(value)
        
        Specifies the title (caption) of the current shape object.
      • getLineFormat : MsoLineFormat 

        function getLineFormat()
        
        Returns a MsoLineFormat object that contains line formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Line property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getFillFormat : MsoFillFormat 

        function getFillFormat()
        
        Returns a MsoFillFormat object that contains fill formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Fill property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.
      • getLine : LineFormat 

        function getLine()
        
        Gets line style
      • getFill : FillFormat 

        function getFill()
        
        Returns a FillFormat object that contains fill formatting properties for the specified shape.
      • getShadowEffect : ShadowEffect 

        function getShadowEffect()
        
        Represents a ShadowEffect object that specifies shadow effect for the chart element or shape.
      • getReflection : ReflectionEffect 

        function getReflection()
        
        Represents a ReflectionEffect object that specifies reflection effect for the chart element or shape.
      • getGlow : GlowEffect 

        function getGlow()
        
        Represents a GlowEffect object that specifies glow effect for the chart element or shape.
      • getSoftEdges/setSoftEdges : Number 

        function getSoftEdges() / function setSoftEdges(value)
        
        Gets and sets the radius of blur to apply to the edges, in unit of points.
      • getThreeDFormat : ThreeDFormat 

        function getThreeDFormat()
        
        Gets and sets 3d format of the shape.
      • getFormatPicture : MsoFormatPicture 

        function getFormatPicture()
        
        Gets and sets the options of the picture format.
      • isHidden/setHidden : boolean 

        function isHidden() / function setHidden(value)
        
        Indicates whether the object is visible.
      • isLockAspectRatio/setLockAspectRatio : boolean 

        function isLockAspectRatio() / function setLockAspectRatio(value)
        
        True means that aspect ratio of the shape is locked. Only for pictures and Ole Objects. NOTE: This member is now obsolete. Instead, please use Shape.IsAspectRatioLocked property. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced.
      • isAspectRatioLocked/setAspectRatioLocked : boolean 

        function isAspectRatioLocked() / function setAspectRatioLocked(value)
        
        True means that aspect ratio of the shape is locked. Only for pictures and Ole Objects.
      • getRotationAngle/setRotationAngle : Number 

        function getRotationAngle() / function setRotationAngle(value)
        
        Gets and sets the rotation of the shape.
      • getHyperlink : Hyperlink 

        function getHyperlink()
        
        Gets the hyperlink of the shape.
      • getId : Number 

        function getId()
        
        Gets the identifier of this shape.
      • getSpid : String 

        function getSpid()
        
        Specifies an optional string identifier that an application can use to identify the particular shape.
      • getSpt : Number 

        function getSpt()
        
        Specifies an optional number that an application can use to associate the particular shape with a defined shape type.
      • getWorksheet : Worksheet 

        function getWorksheet()
        
        Gets the Worksheet object which contains this shape.
      • isGroup : boolean 

        function isGroup()
        
        Indicates whether this shape is a group shape.
      • isInGroup : boolean 

        function isInGroup()
        
        Indicates whether the shape is grouped.
      • isWordArt : boolean 

        function isWordArt()
        
        Indicates whether this shape is a word art. Only for the Legacy Shape of xls file.
      • getTextEffect : TextEffectFormat 

        function getTextEffect()
        
        Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.
      • isLocked/setLocked : boolean 

        function isLocked() / function setLocked(value)
        
        True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.
      • isPrintable/setPrintable : boolean 

        function isPrintable() / function setPrintable(value)
        
        Indicates whether the object is printable. If False, this shape will not be printed when printing.
      • getMsoDrawingType : Number 

        function getMsoDrawingType()
        
        Gets drawing type. The value of the property is MsoDrawingType integer constant.
      • getAutoShapeType/setAutoShapeType : Number 

        function getAutoShapeType() / function setAutoShapeType(value)
        
        Gets and sets the auto shape type. The value of the property is AutoShapeType integer constant.
      • getAnchorType/setAnchorType : Number 

        function getAnchorType() / function setAnchorType(value)
        
        Gets and set the type of the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.
      • getPlacement/setPlacement : Number 

        function getPlacement() / function setPlacement(value)
        
        Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet. The value of the property is PlacementType integer constant.
      • getUpperLeftRow/setUpperLeftRow : Number 

        function getUpperLeftRow() / function setUpperLeftRow(value)
        
        Represents the top row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored.
      • getUpperDeltaY/setUpperDeltaY : Number 

        function getUpperDeltaY() / function setUpperDeltaY(value)
        
        Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256.
      • getUpperLeftColumn/setUpperLeftColumn : Number 

        function getUpperLeftColumn() / function setUpperLeftColumn(value)
        
        Represents upper left corner column index.
      • getUpperDeltaX/setUpperDeltaX : Number 

        function getUpperDeltaX() / function setUpperDeltaX(value)
        
        Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024.
      • getLowerRightRow/setLowerRightRow : Number 

        function getLowerRightRow() / function setLowerRightRow(value)
        
        Represents lower right corner row index.
      • getLowerDeltaY/setLowerDeltaY : Number 

        function getLowerDeltaY() / function setLowerDeltaY(value)
        
        Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256.
      • getLowerRightColumn/setLowerRightColumn : Number 

        function getLowerRightColumn() / function setLowerRightColumn(value)
        
        Represents lower right corner column index.
      • getLowerDeltaX/setLowerDeltaX : Number 

        function getLowerDeltaX() / function setLowerDeltaX(value)
        
        Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024.
      • getRight/setRight : Number 

        function getRight() / function setRight(value)
        
        Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
      • getBottom/setBottom : Number 

        function getBottom() / function setBottom(value)
        
        Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
      • getWidth/setWidth : Number 

        function getWidth() / function setWidth(value)
        
        Represents the width of shape, in unit of pixels.
      • getWidthInch/setWidthInch : Number 

        function getWidthInch() / function setWidthInch(value)
        
        Represents the width of the shape, in unit of inch.
      • getWidthPt/setWidthPt : Number 

        function getWidthPt() / function setWidthPt(value)
        
        Represents the width of the shape, in unit of point.
      • getWidthCM/setWidthCM : Number 

        function getWidthCM() / function setWidthCM(value)
        
        Represents the width of the shape, in unit of centimeters.
      • getHeight/setHeight : Number 

        function getHeight() / function setHeight(value)
        
        Represents the height of shape, in unit of pixel.
      • getHeightInch/setHeightInch : Number 

        function getHeightInch() / function setHeightInch(value)
        
        Represents the height of the shape, in unit of inches.
      • getHeightPt/setHeightPt : Number 

        function getHeightPt() / function setHeightPt(value)
        
        Represents the height of the shape, in unit of points.
      • getHeightCM/setHeightCM : Number 

        function getHeightCM() / function setHeightCM(value)
        
        Represents the height of the shape, in unit of centimeters.
      • getLeft/setLeft : Number 

        function getLeft() / function setLeft(value)
        
        Represents the horizontal offset of shape from its left column, in unit of pixels.
      • getLeftInch/setLeftInch : Number 

        function getLeftInch() / function setLeftInch(value)
        
        Represents the horizontal offset of shape from its left column, in unit of inches.
      • getLeftCM/setLeftCM : Number 

        function getLeftCM() / function setLeftCM(value)
        
        Represents the horizontal offset of shape from its left column, in unit of centimeters.
      • getTop/setTop : Number 

        function getTop() / function setTop(value)
        
        Represents the vertical offset of shape from its top row, in unit of pixels. If the shape is in the chart, represents the vertical offset of shape from its top border.
      • getTopInch/setTopInch : Number 

        function getTopInch() / function setTopInch(value)
        
        Represents the vertical offset of shape from its top row, in unit of inches.
      • getTopCM/setTopCM : Number 

        function getTopCM() / function setTopCM(value)
        
        Represents the vertical offset of shape from its top row, in unit of centimeters.
      • getTopToCorner/setTopToCorner : Number 

        function getTopToCorner() / function setTopToCorner(value)
        
        Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
      • getLeftToCorner/setLeftToCorner : Number 

        function getLeftToCorner() / function setLeftToCorner(value)
        
        Gets and sets the horizonal offset of shape from worksheet left border.
      • getX/setX : Number 

        function getX() / function setX(value)
        
        Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
      • getY/setY : Number 

        function getY() / function setY(value)
        
        Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
      • getWidthScale/setWidthScale : Number 

        function getWidthScale() / function setWidthScale(value)
        
        Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
      • getHeightScale/setHeightScale : Number 

        function getHeightScale() / function setHeightScale(value)
        
        Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
      • getTopInShape/setTopInShape : Number 

        function getTopInShape() / function setTopInShape(value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape. Only Applies when this shape in the group or chart.
      • getLeftInShape/setLeftInShape : Number 

        function getLeftInShape() / function setLeftInShape(value)
        
        Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. Only Applies when this shape in the group or chart.
      • getWidthInShape/setWidthInShape : Number 

        function getWidthInShape() / function setWidthInShape(value)
        
        Represents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or chart.
      • getHeightInShape/setHeightInShape : Number 

        function getHeightInShape() / function setHeightInShape(value)
        
        Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.. Only Applies when this shape in the group or chart.
      • getGroup : GroupShape 

        function getGroup()
        
        Gets the group shape which contains this shape.
      • getType : Number 

        function getType()
        
        Gets the auto shape type. The value of the property is AutoShapeType integer constant.
      • hasLine/setHasLine : boolean 

        function hasLine() / function setHasLine(value)
        
        Gets and sets the line border of the shape is visible.
      • isFilled/setFilled : boolean 

        function isFilled() / function setFilled(value)
        
        Indicates whether the fill format is visible.
      • isFlippedHorizontally/setFlippedHorizontally : boolean 

        function isFlippedHorizontally() / function setFlippedHorizontally(value)
        
        Gets and sets whether shape is horizontally flipped .
      • isFlippedVertically/setFlippedVertically : boolean 

        function isFlippedVertically() / function setFlippedVertically(value)
        
        Gets and sets whether shape is vertically flipped .
      • getActualLowerRightRow : Number 

        function getActualLowerRightRow()
        
        Get the actual bottom row.
      • getRelativeToOriginalPictureSize/setRelativeToOriginalPictureSize : boolean 

        function getRelativeToOriginalPictureSize() / function setRelativeToOriginalPictureSize(value)
        
        Indicates whether shape is relative to original picture size.
      • getLinkedCell/setLinkedCell : String 

        function getLinkedCell() / function setLinkedCell(value)
        
        Gets or sets the worksheet range linked to the control's value.
      • getInputRange/setInputRange : String 

        function getInputRange() / function setInputRange(value)
        
        Gets or sets the worksheet range used to fill the specified combo box.
      • getTextShapeType/setTextShapeType : Number 

        function getTextShapeType() / function setTextShapeType(value)
        
        Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
      • getTextBody : FontSettingCollection 

        function getTextBody()
        
        Gets and sets the setting of the shape's text.
      • getFont/setFont : Font 

        function getFont() / function setFont(value)
        
        Represents the font of shape.
      • getTextOptions/setTextOptions : TextOptions 

        function getTextOptions() / function setTextOptions(value)
        
        Represents the text options of the shape.
      • getText/setText : String 

        function getText() / function setText(value)
        
        Gets and sets the text of this shape.
      • isRichText : boolean 

        function isRichText()
        
        Whether or not the text is rich text.
      • getHtmlText/setHtmlText : String 

        function getHtmlText() / function setHtmlText(value)
        
        Gets and sets the html string which contains data and some formats in this textbox.
      • getTextVerticalOverflow/setTextVerticalOverflow : Number 

        function getTextVerticalOverflow() / function setTextVerticalOverflow(value)
        
        Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
      • getTextHorizontalOverflow/setTextHorizontalOverflow : Number 

        function getTextHorizontalOverflow() / function setTextHorizontalOverflow(value)
        
        Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.
      • isTextWrapped/setTextWrapped : boolean 

        function isTextWrapped() / function setTextWrapped(value)
        
        Gets and sets the text wrapped type of the shape which contains text.
      • getTextOrientationType/setTextOrientationType : Number 

        function getTextOrientationType() / function setTextOrientationType(value)
        
        Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
      • getTextHorizontalAlignment/setTextHorizontalAlignment : Number 

        function getTextHorizontalAlignment() / function setTextHorizontalAlignment(value)
        
        Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.
      • getTextVerticalAlignment/setTextVerticalAlignment : Number 

        function getTextVerticalAlignment() / function setTextVerticalAlignment(value)
        
        Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.
      • getTextDirection/setTextDirection : Number 

        function getTextDirection() / function setTextDirection(value)
        
        Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.
      • getControlData : byte[] 

        function getControlData()
        
        Gets the data of control.
      • getPaths : ShapePathCollection 

        function getPaths()
        
        Gets the paths of a custom geometric shape.
      • getGeometry : Geometry 

        function getGeometry()
        
        Gets the geometry
      • getCreateId/setCreateId : UUID 

        function getCreateId() / function setCreateId(value)
        
        Gets and sets create id for this shape.
    • Method Detail

      • copy

        function copy(source, options)
        Copy the picture.
        Parameters:
        source: Picture - The source picture.
        options: CopyOptions - The copy options.
      • move

        function move(upperLeftRow, upperLeftColumn)
        Moves the picture to a specified location.
        Parameters:
        upperLeftRow: Number - Upper left row index.
        upperLeftColumn: Number - Upper left column index.
      • isSameSetting

        function isSameSetting(obj)
        Returns whether the shape is same.
        Parameters:
        obj: Object -
        Returns:
      • getLinkedCell

        function getLinkedCell(isR1C1, isLocal)
        Gets the range linked to the control's value.
        Parameters:
        isR1C1: boolean - Whether the formula needs to be formatted as R1C1.
        isLocal: boolean - Whether the formula needs to be formatted by locale.
        Returns:
        The range linked to the control's value.
      • setLinkedCell

        function setLinkedCell(formula, isR1C1, isLocal)
        Sets the range linked to the control's value.
        Parameters:
        formula: String - The range linked to the control's value.
        isR1C1: boolean - Whether the formula needs to be formatted as R1C1.
        isLocal: boolean - Whether the formula needs to be formatted by locale.
      • getInputRange

        function getInputRange(isR1C1, isLocal)
        Gets the range used to fill the control.
        Parameters:
        isR1C1: boolean - Whether the formula needs to be formatted as R1C1.
        isLocal: boolean - Whether the formula needs to be formatted by locale.
        Returns:
        The range used to fill the control.
      • setInputRange

        function setInputRange(formula, isR1C1, isLocal)
        Sets the range used to fill the control.
        Parameters:
        formula: String - The range used to fill the control.
        isR1C1: boolean - Whether the formula needs to be formatted as R1C1.
        isLocal: boolean - Whether the formula needs to be formatted by locale.
      • updateSelectedValue

        function updateSelectedValue()
        Update the selected value by the value of the linked cell.
      • calculateTextSize

        function calculateTextSize()
        Recalculate the text area
        Returns:
        Text's Size in an array(width and height).
      • formatCharacters

        function formatCharacters(startIndex, length, font, flag)
        Formats some characters with the font setting.
        Parameters:
        startIndex: Number - The start index.
        length: Number - The length.
        font: Font - The font setting.
        flag: StyleFlag - The flag of the font setting.
      • characters

        function characters(startIndex, length)
        Returns a Characters object that represents a range of characters within the text. This method only works on shape with title.
        Parameters:
        startIndex: Number - The index of the start of the character.
        length: Number - The number of characters.
        Returns:
        Characters object.
      • getCharacters

        function getCharacters()
        Returns all Characters objects that represents a range of characters within the text . NOTE: This method is now obsolete. Instead, please use Shape.GetRichFormattings() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced.
        Returns:
        All Characters objects
      • getRichFormattings

        function getRichFormattings()
        Returns all Characters objects that represents a range of characters within the text .
        Returns:
        All Characters objects
      • removeActiveXControl

        function removeActiveXControl()
        Remove activeX control.
      • getActualBox

        function getActualBox()
        Get the actual position and size of the shape (after applying rotation, flip, etc.) Note:The interface is not fully functional, especially the location information is not correct.It is recommended not to use this interface until the function is complete.
        Returns:
        Return the position and size in the order of x, y, w, h
      • getConnectionPoints

        function getConnectionPoints()
        Get the connection points
        Returns:
        [X,Y] pairs of the connection point. Every item is a float[2] array, [0] represents x and [1] represents y.
      • toImage

        function toImage(imageFile, options)
        Saves the shape to a file.
      • getResultOfSmartArt

        function getResultOfSmartArt()
        Converting smart art to grouped shapes.
      • toFrontOrBack

        function toFrontOrBack(orders)
        Brings the shape to the front or sends the shape to back.
        Parameters:
        orders: Number - If it's less than zero, sets the shape to back. If it's greater than zero, brings the shape to front.
      • getLockedProperty

        function getLockedProperty(type)
        Gets the value of locked property.
        Parameters:
        type: Number - A ShapeLockType value. The type of the shape locked property.
        Returns:
        Returns the value of locked property.
      • setLockedProperty

        function setLockedProperty(type, value)
        Set the locked property.
        Parameters:
        type: Number - A ShapeLockType value. The locked type.
        value: boolean - The value of the property.
      • addHyperlink

        function addHyperlink(address)
        Adds a hyperlink to the shape.
        Parameters:
        address: String - Address of the hyperlink.
        Returns:
        Return the new hyperlink object.
      • removeHyperlink

        function removeHyperlink()
        Removes the hyperlink of the shape.
      • moveToRange

        function moveToRange(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)
        Moves the shape to a specified range.
        Parameters:
        upperLeftRow: Number - Upper left row index.
        upperLeftColumn: Number - Upper left column index.
        lowerRightRow: Number - Lower right row index
        lowerRightColumn: Number - Lower right column index
      • alignTopRightCorner

        function alignTopRightCorner(topRow, rightColumn)
        Moves the picture to the top-right corner.
        Parameters:
        topRow: Number - the row index.
        rightColumn: Number - the column index.