org.apache.poi.hslf.model
Class Freeform
java.lang.Object
org.apache.poi.hslf.model.Shape
org.apache.poi.hslf.model.SimpleShape
org.apache.poi.hslf.model.TextShape
org.apache.poi.hslf.model.AutoShape
org.apache.poi.hslf.model.Freeform
public final class Freeform
- extends AutoShape
A "Freeform" shape.
Shapes drawn with the "Freeform" tool have cubic bezier curve segments in the smooth sections
and straight-line segments in the straight sections. This object closely corresponds to java.awt.geom.GeneralPath
.
- Author:
- Yegor Kozlov
Fields inherited from class org.apache.poi.hslf.model.TextShape |
AlignCenter, AlignJustify, AlignLeft, AlignRight, AnchorBottom, AnchorBottomBaseline, AnchorBottomCentered, AnchorBottomCenteredBaseline, AnchorMiddle, AnchorMiddleCentered, AnchorTop, AnchorTopBaseline, AnchorTopCentered, AnchorTopCenteredBaseline, WrapByPoints, WrapNone, WrapSquare, WrapThrough, WrapTopBottom |
Method Summary |
java.awt.Shape |
getOutline()
Return shape outline as a java.awt.Shape object |
java.awt.geom.GeneralPath |
getPath()
Gets the freeform path |
void |
setPath(java.awt.geom.GeneralPath path)
Set the shape path |
Methods inherited from class org.apache.poi.hslf.model.TextShape |
createTextRun, draw, getHorizontalAlignment, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPlaceholderAtom, getText, getTextId, getTextRun, getVerticalAlignment, getWordWrap, resizeToFitText, setHorizontalAlignment, setHyperlink, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setSheet, setText, setTextId, setVerticalAlignment, setWordWrap |
Methods inherited from class org.apache.poi.hslf.model.SimpleShape |
getFillColor, getFlipHorizontal, getFlipVertical, getLineColor, getLineDashing, getLineStyle, getLineWidth, getLogicalAnchor2D, getRotation, setFillColor, setHyperlink, setLineColor, setLineDashing, setLineStyle, setLineWidth, setRotation |
Methods inherited from class org.apache.poi.hslf.model.Shape |
getAnchor, getAnchor2D, getEscherChild, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getHyperlink, getParent, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setShapeId, setShapeType |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEGMENTINFO_MOVETO
public static final byte[] SEGMENTINFO_MOVETO
SEGMENTINFO_LINETO
public static final byte[] SEGMENTINFO_LINETO
SEGMENTINFO_ESCAPE
public static final byte[] SEGMENTINFO_ESCAPE
SEGMENTINFO_ESCAPE2
public static final byte[] SEGMENTINFO_ESCAPE2
SEGMENTINFO_CUBICTO
public static final byte[] SEGMENTINFO_CUBICTO
SEGMENTINFO_CUBICTO2
public static final byte[] SEGMENTINFO_CUBICTO2
SEGMENTINFO_CLOSE
public static final byte[] SEGMENTINFO_CLOSE
SEGMENTINFO_END
public static final byte[] SEGMENTINFO_END
Freeform
public Freeform(Shape parent)
- Create a new Freeform. This constructor is used when a new shape is created.
- Parameters:
parent
- the parent of this Shape. For example, if this text box is a cell
in a table then the parent is Table.
Freeform
public Freeform()
- Create a new Freeform. This constructor is used when a new shape is created.
setPath
public void setPath(java.awt.geom.GeneralPath path)
- Set the shape path
- Parameters:
path
-
getPath
public java.awt.geom.GeneralPath getPath()
- Gets the freeform path
- Returns:
- the freeform path
getOutline
public java.awt.Shape getOutline()
- Description copied from class:
Shape
- Return shape outline as a java.awt.Shape object
- Overrides:
getOutline
in class AutoShape
- Returns:
- the shape outline