use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method setLineHeadWidth.
public void setLineHeadWidth(DecorationSize decoSize) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.LINESTYLE__LINESTARTARROWWIDTH, decoSize == null ? -1 : decoSize.nativeId);
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method getShadow.
@Override
public Shadow<HSLFShape, HSLFTextParagraph> getShadow() {
AbstractEscherOptRecord opt = getEscherOptRecord();
if (opt == null) {
return null;
}
EscherProperty shadowType = opt.lookup(EscherProperties.SHADOWSTYLE__TYPE);
if (shadowType == null) {
return null;
}
return new Shadow<HSLFShape, HSLFTextParagraph>() {
@Override
public SimpleShape<HSLFShape, HSLFTextParagraph> getShadowParent() {
return HSLFSimpleShape.this;
}
@Override
public double getDistance() {
return getShadowDistance();
}
@Override
public double getAngle() {
return getShadowAngle();
}
@Override
public double getBlur() {
// TODO Auto-generated method stub
return 0;
}
@Override
public SolidPaint getFillStyle() {
return DrawPaint.createSolidPaint(getShadowColor());
}
};
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method setLineHeadLength.
public void setLineHeadLength(DecorationSize decoSize) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.LINESTYLE__LINESTARTARROWLENGTH, decoSize == null ? -1 : decoSize.nativeId);
}
use of org.apache.poi.ddf.AbstractEscherOptRecord 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());
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method setLineDash.
/**
* Sets line dashing.
*
* @param pen new style of the line.
*/
public void setLineDash(LineDash pen) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.LINESTYLE__LINEDASHING, pen == LineDash.SOLID ? -1 : pen.nativeId);
}
Aggregations