Search in sources :

Example 16 with AbstractEscherOptRecord

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

the class HSLFFill method getBackgroundColor.

/**
     * Background color
     */
public Color getBackgroundColor() {
    AbstractEscherOptRecord opt = shape.getEscherOptRecord();
    EscherSimpleProperty p = HSLFShape.getEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST);
    int propVal = (p == null) ? 0 : p.getPropertyValue();
    return (FILL_USE_FILLED.isSet(propVal) && !FILL_FILLED.isSet(propVal)) ? null : shape.getColor(EscherProperties.FILL__FILLBACKCOLOR, EscherProperties.FILL__FILLOPACITY, -1);
}
Also used : EscherSimpleProperty(org.apache.poi.ddf.EscherSimpleProperty) AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord) DrawPaint(org.apache.poi.sl.draw.DrawPaint) GradientPaint(org.apache.poi.sl.usermodel.PaintStyle.GradientPaint) TexturePaint(org.apache.poi.sl.usermodel.PaintStyle.TexturePaint)

Example 17 with AbstractEscherOptRecord

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

the class HSLFSimpleShape method getLineTailLength.

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

Example 18 with AbstractEscherOptRecord

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

the class HSLFSimpleShape method setLineCompound.

/**
     * Sets the line compound style
     *
     * @param style new compound style of the line.
     */
public void setLineCompound(LineCompound style) {
    AbstractEscherOptRecord opt = getEscherOptRecord();
    setEscherProperty(opt, EscherProperties.LINESTYLE__LINESTYLE, style == LineCompound.SINGLE ? -1 : style.nativeId);
}
Also used : AbstractEscherOptRecord(org.apache.poi.ddf.AbstractEscherOptRecord)

Example 19 with AbstractEscherOptRecord

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

the class HSLFSimpleShape method getLineHeadLength.

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

Example 20 with AbstractEscherOptRecord

use of org.apache.poi.ddf.AbstractEscherOptRecord 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)

Aggregations

AbstractEscherOptRecord (org.apache.poi.ddf.AbstractEscherOptRecord)68 EscherSimpleProperty (org.apache.poi.ddf.EscherSimpleProperty)36 DrawPaint (org.apache.poi.sl.draw.DrawPaint)13 Color (java.awt.Color)8 GradientPaint (org.apache.poi.sl.usermodel.PaintStyle.GradientPaint)7 TexturePaint (org.apache.poi.sl.usermodel.PaintStyle.TexturePaint)7 EscherArrayProperty (org.apache.poi.ddf.EscherArrayProperty)6 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)6 SolidPaint (org.apache.poi.sl.usermodel.PaintStyle.SolidPaint)6 EscherBSERecord (org.apache.poi.ddf.EscherBSERecord)4 Rectangle2D (java.awt.geom.Rectangle2D)3 EscherColorRef (org.apache.poi.ddf.EscherColorRef)3 EscherComplexProperty (org.apache.poi.ddf.EscherComplexProperty)3 EscherRecord (org.apache.poi.ddf.EscherRecord)3 EscherSpRecord (org.apache.poi.ddf.EscherSpRecord)3 AffineTransform (java.awt.geom.AffineTransform)2 EscherProperty (org.apache.poi.ddf.EscherProperty)2 Document (org.apache.poi.hslf.record.Document)2 Test (org.junit.Test)2 Insets (java.awt.Insets)1