//Initialize a new workbook.
Workbook book = new Workbook();
//Add a shape.(e.g rectangle)
Shape shape = book.getWorksheets().get(0).getShapes().addRectangle(2, 0, 2, 0, 130, 130);
//do your business
//Save the excel file.
book.save("exmaple.xlsx");
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;
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.
Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.
Applies to Shape objects that represent WordArt.
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;
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.
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.
Represents the setting of the shape's formatting.
NOTE: This member is now obsolete. Instead,
please use Shape.Fill and Shape.Line properties.
This property will be removed 6 months later since August 2016.
Aspose apologizes for any inconvenience you may have experienced.
Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape.
NOTE: This member is now obsolete. Instead,
please use Shape.TextBody.TextAlignment property.
This property will be removed 12 months later since May 2016.
Aspose apologizes for any inconvenience you may have experienced.
Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape.
Applies to Shape objects that represent WordArt.
public int getAutoShapeType() / public void setAutoShapeType(int value)
Gets and sets the auto shape type.
The value of the property is AutoShapeType integer constant.
Example:
if (shape.getAutoShapeType() == com.aspose.cells.AutoShapeType.UNKNOWN)
shape.setAutoShapeType(com.aspose.cells.AutoShapeType.RECTANGLE);
getAnchorType/setAnchorType
public int getAnchorType() / public void setAnchorType(int value)
Gets and set the shape anchor placeholder.
The value of the property is ShapeAnchorType integer constant.
Example:
if (shape.getAnchorType() == ShapeAnchorType.ONE_CELL_ANCHOR)
shape.setAnchorType(ShapeAnchorType.TWO_CELL_ANCHOR);
getPlacement/setPlacement
public int getPlacement() / public void setPlacement(int 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.
Example:
if (shape.getPlacement() == PlacementType.MOVE)
shape.setPlacement(PlacementType.MOVE_AND_SIZE);
getUpperLeftRow/setUpperLeftRow
public int getUpperLeftRow() / public void setUpperLeftRow(int value)
Represents upper left corner row index.
If the shape is in the shape or in the group , UpperLeftRow will be ignored.
Example:
if (shape.getUpperLeftRow() == 3)
shape.setUpperLeftRow(1);
getUpperDeltaY/setUpperDeltaY
public int getUpperDeltaY() / public void setUpperDeltaY(int value)
Gets or sets the shape's vertical offset from its upper left corner row.
The range of value is 0 to 256.
Example:
if (shape.getUpperDeltaY() == 3)
shape.setUpperDeltaY(1);
getUpperLeftColumn/setUpperLeftColumn
public int getUpperLeftColumn() / public void setUpperLeftColumn(int value)
Represents upper left corner column index.
Example:
if (shape.getUpperLeftColumn() == 3)
shape.setUpperLeftColumn(1);
getUpperDeltaX/setUpperDeltaX
public int getUpperDeltaX() / public void setUpperDeltaX(int value)
Gets or sets the shape's horizontal offset from its upper left corner column.
The range of value is 0 to 1024.
Example:
if (shape.getUpperDeltaX() == 3)
shape.setUpperDeltaX(1);
getLowerRightRow/setLowerRightRow
public int getLowerRightRow() / public void setLowerRightRow(int value)
Represents lower right corner row index.
Example:
if (shape.getLowerRightRow() == 3)
shape.setLowerRightRow(1);
getLowerDeltaY/setLowerDeltaY
public int getLowerDeltaY() / public void setLowerDeltaY(int value)
Gets or sets the shape's vertical offset from its lower right corner row.
The range of value is 0 to 256.
Example:
if (shape.getLowerDeltaY() == 3)
shape.setLowerDeltaY(1);
getLowerRightColumn/setLowerRightColumn
public int getLowerRightColumn() / public void setLowerRightColumn(int value)
Represents lower right corner column index.
Example:
if (shape.getLowerRightColumn() == 3)
shape.setLowerRightColumn(1);
getLowerDeltaX/setLowerDeltaX
public int getLowerDeltaX() / public void setLowerDeltaX(int value)
Gets or sets the shape's horizontal offset from its lower right corner column.
The range of value is 0 to 1024.
Example:
if (shape.getLowerDeltaX() == 3)
shape.setLowerDeltaX(1);
getRight/setRight
public int getRight() / public void setRight(int value)
Represents the width of the shape's horizontal offset from its lower right corner column, in unit of pixels.
Example:
if (shape.getRight() == 3)
shape.setRight(1);
getBottom/setBottom
public int getBottom() / public void setBottom(int value)
Represents the width of the shape's vertical offset from its lower bottom corner row, in unit of pixels.
Example:
if (shape.getBottom() == 3)
shape.setBottom(1);
getWidth/setWidth
public int getWidth() / public void setWidth(int value)
Represents the width of shape, in unit of pixels.
Example:
if (shape.getWidth() == 3)
shape.setWidth(1);
getWidthInch/setWidthInch
public double getWidthInch() / public void setWidthInch(double value)
Represents the width of the shape, in unit of inch.
Example:
if (shape.getWidthInch() == 3)
shape.setWidthInch(1);
getWidthPt/setWidthPt
public double getWidthPt() / public void setWidthPt(double value)
Represents the width of the shape, in unit of point.
Example:
if (shape.getWidthPt() == 3)
shape.setWidthPt(1);
getWidthCM/setWidthCM
public double getWidthCM() / public void setWidthCM(double value)
Represents the width of the shape, in unit of centimeters.
Example:
if (shape.getWidthCM() == 3)
shape.setWidthCM(1);
getHeight/setHeight
public int getHeight() / public void setHeight(int value)
Represents the height of shape, in unit of pixel.
Example:
if (shape.getHeight() == 3)
shape.setHeight(1);
getHeightInch/setHeightInch
public double getHeightInch() / public void setHeightInch(double value)
Represents the height of the shape, in unit of inches.
Example:
if (shape.getHeightInch() == 3)
shape.setHeightInch(1);
getHeightPt/setHeightPt
public double getHeightPt() / public void setHeightPt(double value)
Represents the height of the shape, in unit of points.
Example:
if (shape.getHeightPt() == 3)
shape.setHeightPt(1);
getHeightCM/setHeightCM
public double getHeightCM() / public void setHeightCM(double value)
Represents the height of the shape, in unit of centimeters.
Example:
if (shape.getHeightCM() == 3)
shape.setHeightCM(1);
getLeft/setLeft
public int getLeft() / public void setLeft(int value)
Represents the horizontal offset of shape from its left column, in unit of pixels.
Example:
if (shape.getLeft() == 3)
shape.setLeft(1);
getLeftInch/setLeftInch
public double getLeftInch() / public void setLeftInch(double value)
Represents the horizontal offset of shape from its left column, in unit of inches.
Example:
if (shape.getLeftInch() == 3)
shape.setLeftInch(1);
getLeftCM/setLeftCM
public double getLeftCM() / public void setLeftCM(double value)
Represents the horizontal offset of shape from its left column, in unit of centimeters.
Example:
if (shape.getLeftCM() == 3)
shape.setLeftCM(1);
getTop/setTop
public int getTop() / public void setTop(int 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.
Example:
if (shape.getTop() == 3)
shape.setTop(1);
getTopInch/setTopInch
public double getTopInch() / public void setTopInch(double value)
Represents the vertical offset of shape from its top row, in unit of inches.
Example:
if (shape.getTopInch() == 3)
shape.setTopInch(1);
getTopCM/setTopCM
public double getTopCM() / public void setTopCM(double value)
Represents the vertical offset of shape from its top row, in unit of centimeters.
Example:
if (shape.getTopCM() == 3)
shape.setTopCM(1);
getTopToCorner/setTopToCorner
public int getTopToCorner() / public void setTopToCorner(int value)
Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
Example:
if (shape.getTopToCorner() == 3)
shape.setTopToCorner(1);
getLeftToCorner/setLeftToCorner
public int getLeftToCorner() / public void setLeftToCorner(int value)
Gets and sets the horizonal offset of shape from worksheet left border.
Example:
if (shape.getLeftToCorner() == 3)
shape.setLeftToCorner(1);
getX/setX
public int getX() / public void setX(int value)
Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
Example:
if (shape.getX() == 3)
shape.setX(1);
getY/setY
public int getY() / public void setY(int value)
Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
Example:
if (shape.getY() == 3)
shape.setY(1);
getWidthScale/setWidthScale
public int getWidthScale() / public void setWidthScale(int 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;
Example:
if (shape.getWidthScale() == 3)
shape.setWidthScale(1);
getHeightScale/setHeightScale
public int getHeightScale() / public void setHeightScale(int 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;
Example:
if (shape.getHeightScale() == 3)
shape.setHeightScale(1);
getTopInShape/setTopInShape
public int getTopInShape() / public void setTopInShape(int 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.
Example:
if (shape.getTopInShape() == 8000)
shape.setTopInShape(4000);
getLeftInShape/setLeftInShape
public int getLeftInShape() / public void setLeftInShape(int 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.
Example:
if (shape.getUpperDeltaY() == 2000)
shape.setUpperDeltaY(4000);
getWidthInShape/setWidthInShape
public int getWidthInShape() / public void setWidthInShape(int 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.
Example:
if (shape.getUpperDeltaY() == 2000)
shape.setUpperDeltaY(4000);
getHeightInShape/setHeightInShape
public int getHeightInShape() / public void setHeightInShape(int 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.
Example:
if (shape.getUpperDeltaY() == 4000)
shape.setUpperDeltaY(2000);
getHeightInChart/setHeightInChart
public int getHeightInChart() / public void setHeightInChart(int 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..
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.HeightInShape property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
getLeftInChart/setLeftInChart
public int getLeftInChart() / public void setLeftInChart(int value)
Represents the vertical offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.LeftInShape property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
getTopInChart/setTopInChart
public int getTopInChart() / public void setTopInChart(int 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.
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.TopInShape property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
getWidthInChart/setWidthInChart
public int getWidthInChart() / public void setWidthInChart(int value)
Represents the width of the shape, in unit of 1/4000 of the parent shape.
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.WidthInShape property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
getPositionX/setPositionX
public int getPositionX() / public void setPositionX(int value)
Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels.
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.X property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
getPositionY/setPositionY
public int getPositionY() / public void setPositionY(int value)
Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
NOTE: This member is now obsolete. Instead,
please use Aspose.Cells.Drawing.Shape.Y property.
This property will be removed 12 months later since JANUARY 2012.
Aspose apologizes for any inconvenience you may have experienced.
public java.awt.geom.Point2D.Float[] getConnectionPoints()
Get the connection points
NOTE: This member is now obsolete. Instead,
please use GetConnectionPoints() method.
This method will be removed 12 months later since April 2022.
Aspose apologizes for any inconvenience you may have experienced.
public java.lang.String getText() / public void setText(java.lang.String value)
Represents the string in this TextBox object.
Example:
if(shape.getText() == null)
shape.setText("This is a test.");
isRichText
public boolean isRichText()
Whether or not the text is rich text.
Example:
if(shape.isRichText())
System.out.println("The text is rich text.");
getHtmlText/setHtmlText
public java.lang.String getHtmlText() / public void setHtmlText(java.lang.String value)
Gets and sets the html string which contains data and some formats in this textbox.
Example:
if(shape.getHtmlText() == null || "".equals(shape.getHtmlText()))
shape.setHtmlText("<Font Style="FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #0000ff;TEXT-ALIGN: left;">This is a <b>test</b>.</Font>");
getTextVerticalOverflow/setTextVerticalOverflow
public int getTextVerticalOverflow() / public void setTextVerticalOverflow(int value)
Gets and sets the text vertical overflow type of the shape which contains text.
The value of the property is TextOverflowType integer constant.
Example:
if (shape.getTextVerticalOverflow() == com.aspose.cells.TextOverflowType.CLIP)
shape.setTextVerticalOverflow(com.aspose.cells.TextOverflowType.OVERFLOW);
public int getTextHorizontalOverflow() / public void setTextHorizontalOverflow(int value)
Gets and sets the text horizontal overflow type of the shape which contains text.
The value of the property is TextOverflowType integer constant.
Example:
if (shape.getTextHorizontalOverflow() == com.aspose.cells.TextOverflowType.CLIP)
shape.setTextHorizontalOverflow(com.aspose.cells.TextOverflowType.OVERFLOW);
isTextWrapped/setTextWrapped
public boolean isTextWrapped() / public void setTextWrapped(boolean value)
Gets and sets the text wrapped type of the shape which contains text.
Example:
if (shape.isTextWrapped())
shape.setTextWrapped(!shape.isTextWrapped());
getTextOrientationType/setTextOrientationType
public int getTextOrientationType() / public void setTextOrientationType(int value)
Gets and sets the text orientation type of the shape.
The value of the property is TextOrientationType integer constant.
Example:
if (shape.getTextOrientationType() == com.aspose.cells.TextOrientationType.NO_ROTATION)
shape.setTextOrientationType(com.aspose.cells.TextOrientationType.TOP_TO_BOTTOM);
public int getTextHorizontalAlignment() / public void setTextHorizontalAlignment(int value)
Gets and sets the text horizontal alignment type of the shape.
The value of the property is TextAlignmentType integer constant.
Example:
if (shape.getTextHorizontalAlignment() == com.aspose.cells.TextAlignmentType.BOTTOM)
shape.setTextHorizontalAlignment(com.aspose.cells.TextAlignmentType.CENTER);
getTextVerticalAlignment/setTextVerticalAlignment
public int getTextVerticalAlignment() / public void setTextVerticalAlignment(int value)
Gets and sets the text vertical alignment type of the shape.
The value of the property is TextAlignmentType integer constant.
Example:
if (shape.getTextVerticalAlignment() == com.aspose.cells.TextAlignmentType.BOTTOM)
shape.setTextVerticalAlignment(com.aspose.cells.TextAlignmentType.CENTER);
getTextDirection/setTextDirection
public int getTextDirection() / public void setTextDirection(int value)
Gets/Sets the direction of the text flow for this object.
The value of the property is TextDirectionType integer constant.
Example:
if (shape.getTextDirection() == com.aspose.cells.TextDirectionType.CONTEXT)
shape.setTextDirection(com.aspose.cells.TextDirectionType.LEFT_TO_RIGHT);
CheckBoxActiveXControl checkBox1 = (CheckBoxActiveXControl)shape.getActiveXControl();
//The font name of CheckBox
String fontName = checkBox1.getFont().getName();
if (shape.getGeometry().getShapeAdjustValues().getCount() == 0)
System.out.println("No geometry path.");
getCreateId
public java.util.UUID getCreateId()
Gets and sets create id for this shape.
Method Detail
getLinkedCell
public java.lang.String getLinkedCell(boolean isR1C1, boolean isLocal)
Gets the range linked to the control's value.
Parameters:
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Returns:
The range linked to the control's value.
Example:
//You may get results like '$A$1'
String link = shape.getLinkedCell(false, false);
setLinkedCell
public void setLinkedCell(java.lang.String formula, boolean isR1C1, boolean isLocal)
Sets the range linked to the control's value.
Parameters:
formula - The range linked to the control's value.
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Example:
//After executing the code below, a ScrollBar object is created in the generated file. As you drag the slider, the value is displayed in cell A12.
//ActiveX Controls
//Aspose.Cells.Drawing.Shape scrollBar = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ScrollBar,2, 0, 2, 0, 30, 130);
//Form Controls
Shape scrollBar = book.getWorksheets().get(0).getShapes().addScrollBar(2, 0, 2, 0, 130, 30);
//Sets the range linked to the control's value.
scrollBar.setLinkedCell("$A$12", false, true);
getInputRange
public java.lang.String getInputRange(boolean isR1C1, boolean isLocal)
Gets the range used to fill the control.
Parameters:
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Returns:
The range used to fill the control.
Example:
String range = shape.getInputRange(false, true);
//If successful, a value like "$A$1:$A$3" will be returned
setInputRange
public void setInputRange(java.lang.String formula, boolean isR1C1, boolean isLocal)
Sets the range used to fill the control.
Parameters:
formula - The range used to fill the control.
isR1C1 - Whether the formula needs to be formatted as R1C1.
isLocal - Whether the formula needs to be formatted by locale.
Example:
//After executing the code below, a ListBox object is created in the generated file. When the selected option is clicked, the selected value is displayed in cell A12.
//Initialize a new workbook.
//Workbook book = new Workbook();
for (int i = 0; i< 10; ++i)
{
Cell cell = book.getWorksheets().get(0).getCells().get(i, 0);
cell.setValue(i + 1);
}
//Create a ListBox object
//ActiveX Controls
//Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130);
//Form Controls
Shape listBox = book.getWorksheets().get(0).getShapes().addListBox(2, 0, 2, 0, 130, 130);
//Sets the range used to fill the control.
listBox.setInputRange("$A$1:$A$6", false, false);
//Sets the range linked to the control's value.
listBox.setLinkedCell("$A$12", false, true);
updateSelectedValue
public void updateSelectedValue()
throws java.lang.Exception
Update the selected value by the value of the linked cell.
Example:
//Initialize a new workbook.
//Workbook book = new Workbook();
Cell cell = null;
for (int i = 0; i< 10; ++i)
{
cell = book.getWorksheets().get(0).getCells().get(i, 0);
cell.setValue(i + 1);
}
//Create a ListBox object
//ActiveX Controls
//Aspose.Cells.Drawing.Shape listBox = book.Worksheets[0].Shapes.AddActiveXControl( Aspose.Cells.Drawing.ActiveXControls.ControlType.ListBox,2, 0, 2, 0, 130, 130);
//Form Controls
Shape listBox = book.getWorksheets().get(0).getShapes().addListBox(2, 0, 2, 0, 130, 130);
//Sets the range used to fill the control.
listBox.setInputRange("$A$1:$A$6", false, false);
//Sets the range linked to the control's value.
listBox.setLinkedCell("$A$12", false, true);
ListBox listbx = (ListBox)listBox;
//Set the value of cell A12
cell = book.getWorksheets().get(0).getCells().get(11, 0);
cell.setValue(3);
//Update the selected value by the value of the linked cell.
listBox.updateSelectedValue();
//-1 default, no option selected
if(listbx.isSelected(2))
{
//Option 3 of the ListBox is selected
}
//Change the value of a linked cell
cell.setValue(4);
//Update the selected value by the value of the linked cell.
listBox.updateSelectedValue();
if(listbx.isSelected(3))
{
//Option 4 of the ListBox is selected
}
calculateTextSize
public int[] calculateTextSize()
throws java.lang.Exception
Recalculate the text area
Returns:
Text's Size in an array(width and height).
Example:
//The size of the text area is:w=size[0],h=size[1]
int[] size = shape.calculateTextSize();
formatCharacters
public void formatCharacters(int startIndex, int length, Font font, StyleFlag flag)
throws java.lang.Exception
Formats some characters with the font setting.
Parameters:
startIndex - The start index.
length - The length.
font - The font setting.
flag - The flag of the font setting.
formatCharacters
public void formatCharacters(int startIndex, int length, Font font)
Formats some characters with the font setting.
NOTE: This member is now obsolete. Instead,
please use Shape.FormatCharacters(int startIndex, int length, Font font, StyleFlag flag) method.
This property will be removed 12 months later since March 2016.
Aspose apologizes for any inconvenience you may have experienced.
Parameters:
startIndex - The start index.
length - The length.
font - The font setting.
characters
public FontSettingcharacters(int startIndex, int length)
Returns a Characters object that represents a range of characters within the text.
This method only works on shape with title.
Parameters:
startIndex - The index of the start of the character.
length - The number of characters.
Returns:
Characters object.
Example:
FontSetting fontSetting = shape.characters(0, 4);
getCharacters
public java.util.ArrayList getCharacters()
throws java.lang.Exception
Returns all Characters objects
that represents a range of characters within the text .
Returns:
All Characters objects
Example:
ArrayList list = shape.getCharacters();
removeActiveXControl
public void removeActiveXControl()
Remove activeX control.
Example:
shape.removeActiveXControl();
isSameSetting
public boolean isSameSetting(java.lang.Object obj)
Returns whether the shape is same.
Parameters:
obj -
Returns:
Example:
if (shape.isSameSetting(shape))
System.out.println("Two objects the same.");
getConnectionPoints
public float[][] 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.
Example:
float[][] points = shape.getConnectionPoints();
toImage
public void toImage(java.io.OutputStream stream, ImageFormat imageFormat)
throws java.lang.Exception
Creates the shape image and saves it to a stream in the specified format.
The following formats are supported:
.bmp, .gif, .jpg, .jpeg, .tiff, .emf.
Parameters:
stream - The output stream.
imageFormat - The format in which to save the image.
toImage
public void toImage(java.lang.String imageFile, ImageOrPrintOptions options)
throws java.lang.Exception
Saves the shape to a file.
Example:
ImageOrPrintOptions op = new ImageOrPrintOptions();
shape.toImage("exmaple.png", op);
toImage
public void toImage(java.io.OutputStream stream, ImageOrPrintOptions options)
throws java.lang.Exception
Saves the shape to a stream.
getResultOfSmartArt
public GroupShapegetResultOfSmartArt()
throws java.lang.Exception