Search in sources :

Example 16 with EscherSimpleProperty

use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.

the class HSLFSimpleShape method getLineHeadWidth.

public DecorationSize getLineHeadWidth() {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINESTARTARROWWIDTH);
    return (prop == null) ? null : DecorationSize.fromNativeId(prop.getPropertyValue());
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Example 17 with EscherSimpleProperty

use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.

the class HSLFSimpleShape method getLineCap.

/**
     * Gets line cap.
     *
     * @return cap of the line.
     */
public LineCap getLineCap() {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEENDCAPSTYLE);
    return (prop == null) ? LineCap.FLAT : LineCap.fromNativeId(prop.getPropertyValue());
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Example 18 with EscherSimpleProperty

use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.

the class HSLFSimpleShape method getLineTailDecoration.

public DecorationShape getLineTailDecoration() {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEENDARROWHEAD);
    return (prop == null) ? null : DecorationShape.fromNativeId(prop.getPropertyValue());
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Example 19 with EscherSimpleProperty

use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.

the class HSLFSimpleShape method getLineHeadDecoration.

public DecorationShape getLineHeadDecoration() {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINESTARTARROWHEAD);
    return (prop == null) ? null : DecorationShape.fromNativeId(prop.getPropertyValue());
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Example 20 with EscherSimpleProperty

use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.

the class HSLFSimpleShape method getLineWidth.

/**
     *  Returns width of the line in in points
     */
public double getLineWidth() {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEWIDTH);
    double width = (prop == null) ? DEFAULT_LINE_WIDTH : Units.toPoints(prop.getPropertyValue());
    return width;
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Aggregations

EscherSimpleProperty (org.apache.poi.ddf.EscherSimpleProperty)48 AbstractEscherOptRecord (org.apache.poi.ddf.AbstractEscherOptRecord)36 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)8 DrawPaint (org.apache.poi.sl.draw.DrawPaint)8 EscherBSERecord (org.apache.poi.ddf.EscherBSERecord)6 GradientPaint (org.apache.poi.sl.usermodel.PaintStyle.GradientPaint)6 TexturePaint (org.apache.poi.sl.usermodel.PaintStyle.TexturePaint)6 Color (java.awt.Color)5 EscherOptRecord (org.apache.poi.ddf.EscherOptRecord)5 EscherRecord (org.apache.poi.ddf.EscherRecord)4 EscherArrayProperty (org.apache.poi.ddf.EscherArrayProperty)3 EscherSpRecord (org.apache.poi.ddf.EscherSpRecord)3 AffineTransform (java.awt.geom.AffineTransform)2 Rectangle2D (java.awt.geom.Rectangle2D)2 EscherBoolProperty (org.apache.poi.ddf.EscherBoolProperty)2 EscherColorRef (org.apache.poi.ddf.EscherColorRef)2 EscherDgRecord (org.apache.poi.ddf.EscherDgRecord)2 EscherProperty (org.apache.poi.ddf.EscherProperty)2 EscherRGBProperty (org.apache.poi.ddf.EscherRGBProperty)2 Document (org.apache.poi.hslf.record.Document)2