org.apache.poi.xslf.usermodel
Class XSLFFreeformShape

java.lang.Object
  extended by org.apache.poi.xslf.usermodel.XSLFShape
      extended by org.apache.poi.xslf.usermodel.XSLFSimpleShape
          extended by org.apache.poi.xslf.usermodel.XSLFTextShape
              extended by org.apache.poi.xslf.usermodel.XSLFAutoShape
                  extended by org.apache.poi.xslf.usermodel.XSLFFreeformShape
All Implemented Interfaces:
java.lang.Iterable<XSLFTextParagraph>

@Beta
public class XSLFFreeformShape
extends XSLFAutoShape

Represents a custom geometric shape. This shape will consist of a series of lines and curves described within a creation path.

Author:
Yegor Kozlov

Method Summary
 java.awt.geom.GeneralPath getPath()
          Gets the shape path.
 int setPath(java.awt.geom.GeneralPath path)
          Set the shape path
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFAutoShape
getTextBody, toString
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFTextShape
addNewTextParagraph, clearText, drawContent, getBottomInset, getLeftInset, getRightInset, getText, getTextAutofit, getTextBodyPr, getTextDirection, getTextHeight, getTextParagraphs, getTextType, getTopInset, getVerticalAlignment, getWordWrap, iterator, resizeToFitText, setBottomInset, setLeftInset, setPlaceholder, setRightInset, setText, setTextAutofit, setTextDirection, setTopInset, setVerticalAlignment, setWordWrap
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFSimpleShape
draw, getAnchor, getCTPlaceholder, getFillColor, getFlipHorizontal, getFlipVertical, getLineCap, getLineColor, getLineDash, getLineHeadDecoration, getLineHeadLength, getLineHeadWidth, getLineTailDecoration, getLineTailLength, getLineTailWidth, getLineWidth, getNvPr, getRotation, getShadow, getShapeId, getShapeName, getShapeType, getSheet, getSpPr, getSpStyle, getXmlObject, setAnchor, setFillColor, setFlipHorizontal, setFlipVertical, setLineCap, setLineColor, setLineDash, setLineHeadDecoration, setLineHeadLength, setLineHeadWidth, setLineTailDecoration, setLineTailLength, setLineTailWidth, setLineWidth, setRotation, setShapeType
 
Methods inherited from class org.apache.poi.xslf.usermodel.XSLFShape
applyTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setPath

public int setPath(java.awt.geom.GeneralPath path)
Set the shape path

Parameters:
path - shape outline
Returns:
the number of points written

getPath

public java.awt.geom.GeneralPath getPath()
Gets the shape path.

The path is translated in the shape's coordinate system, i.e. freeform.getPath().getBounds2D() equals to freeform.getAnchor() (small discrepancies are possible due to rounding errors)

Returns:
the path


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.