public interface IGeometryShape extends IShape
Represents the parent class for all geometric shapes.
Modifier and Type | Method and Description |
---|---|
IShapeElement[] |
createShapeElements()
Creates and returns array of shape's elements.
|
IAdjustValueCollection |
getAdjustments()
Returns a collection of shape's adjustment values.
|
IGeometryPath[] |
getGeometryPaths()
Returns the copy of path of the geometry shape.
|
IShapeStyle |
getShapeStyle()
Returns shape's style object.
|
int |
getShapeType()
Returns or sets the geometry preset type.
|
void |
setGeometryPath(IGeometryPath geometryPath)
Updates shape geometry from
IGeometryPath object. |
void |
setGeometryPaths(IGeometryPath[] geometryPaths)
Updates shape geometry from array of
IGeometryPath . |
void |
setShapeType(int value)
Returns or sets the geometry preset type.
|
addPlaceholder, getAlternativeText, getAlternativeTextTitle, getBlackWhiteMode, getConnectionSiteCount, getCustomData, getEffectFormat, getFillFormat, getFrame, getHeight, getHidden, getLineFormat, getName, getOfficeInteropShapeId, getParentGroup, getPlaceholder, getRawFrame, getRotation, getShapeLock, getThreeDFormat, getThumbnail, getThumbnail, getUniqueId, getWidth, getX, getY, getZOrderPosition, isGrouped, isTextHolder, removePlaceholder, setAlternativeText, setAlternativeTextTitle, setBlackWhiteMode, setFrame, setHeight, setHidden, setName, setRawFrame, setRotation, setWidth, setX, setY, writeAsSvg, writeAsSvg
getSlide
getPresentation
getHyperlinkClick, getHyperlinkManager, getHyperlinkMouseOver, setHyperlinkClick, setHyperlinkMouseOver
IGeometryPath[] getGeometryPaths()
Returns the copy of path of the geometry shape. Coordinates are relative to the left top corner of the shape.
Presentation pres = new Presentation(); try { GeometryShape shape = (GeometryShape) pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 100, 100, 200, 100); IGeometryPath geometryPath = shape.getGeometryPaths()[0]; geometryPath.lineTo(100, 50, 1); geometryPath.lineTo(100, 50, 4); shape.setGeometryPath(geometryPath); pres.save("output.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
IGeometryPath
void setGeometryPath(IGeometryPath geometryPath)
Updates shape geometry from IGeometryPath
object. Coordinates must be relative to the left
top corner of the shape.
Changes the type of the shape (ShapeType(getShapeType()
/setShapeType(int)
)) to ShapeType.Custom
.
Presentation pres = new Presentation(); try { GeometryShape shape = (GeometryShape) pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 100, 100, 200, 100); GeometryPath geometryPath0 = new GeometryPath(); geometryPath0.moveTo(0, 0); geometryPath0.lineTo(shape.getWidth(), 0); geometryPath0.lineTo(shape.getWidth(), shape.getHeight()/3); geometryPath0.lineTo(0, shape.getHeight() / 3); geometryPath0.closeFigure(); GeometryPath geometryPath1 = new GeometryPath(); geometryPath1.moveTo(0, shape.getHeight()/3 * 2); geometryPath1.lineTo(shape.getWidth(), shape.getHeight() / 3 * 2); geometryPath1.lineTo(shape.getWidth(), shape.getHeight()); geometryPath1.lineTo(0, shape.getHeight()); geometryPath1.closeFigure(); shape.setGeometryPaths(new GeometryPath[] { geometryPath0, geometryPath1}); pres.save("output.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
geometryPath
- Geometry pathcom.aspose.ms.System.ArgumentException
- No path foundcom.aspose.ms.System.ArgumentException
- Empty path foundvoid setGeometryPaths(IGeometryPath[] geometryPaths)
Updates shape geometry from array of IGeometryPath
. Coordinates must be relative to the left
top corner of the shape.
Changes the type of the shape (ShapeType(getShapeType()
/setShapeType(int)
)) to ShapeType.Custom
.
Presentation pres = new Presentation(); try { GeometryShape shape = (GeometryShape)pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 100, 100, 200, 100); IGeometryPath geometryPath = shape.getGeometryPaths()[0]; geometryPath.lineTo(100, 50, 1); geometryPath.lineTo(100, 50, 4); shape.setGeometryPath(geometryPath); pres.save("output.pptx", SaveFormat.Pptx); } finally { if (pres != null) pres.dispose(); }
geometryPaths
- Array geometry pathscom.aspose.ms.System.ArgumentException
- No path foundcom.aspose.ms.System.ArgumentException
- Empty pathIShapeStyle getShapeStyle()
Returns shape's style object.
Read-only IShapeStyle
.
int getShapeType()
Returns or sets the geometry preset type.
Note: on value changing all adjustment values will reset to their default values.
Read/write ShapeType
.
void setShapeType(int value)
Returns or sets the geometry preset type.
Note: on value changing all adjustment values will reset to their default values.
Read/write ShapeType
.
IAdjustValueCollection getAdjustments()
Returns a collection of shape's adjustment values.
Read-only IAdjustValueCollection
.
IShapeElement[] createShapeElements()
Creates and returns array of shape's elements.
IShapeElement