use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method setLineWidth.
/**
* Sets the width of line in in points
* @param width the width of line in in points
*/
public void setLineWidth(double width) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.LINESTYLE__LINEWIDTH, Units.toEMU(width));
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method setLineTailLength.
public void setLineTailLength(DecorationSize decoSize) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, EscherProperties.LINESTYLE__LINEENDARROWLENGTH, decoSize == null ? -1 : decoSize.nativeId);
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFShape method setEscherProperty.
/**
* Set an simple escher property for this shape.
*
* @param propId The id of the property. One of the constants defined in EscherOptRecord.
* @param value value of the property. If value = -1 then the property is removed.
*/
public void setEscherProperty(short propId, int value) {
AbstractEscherOptRecord opt = getEscherOptRecord();
setEscherProperty(opt, propId, value);
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFShapeFactory method createNonPrimitive.
private static HSLFShape createNonPrimitive(EscherContainerRecord spContainer, ShapeContainer<HSLFShape, HSLFTextParagraph> parent) {
AbstractEscherOptRecord opt = HSLFShape.getEscherChild(spContainer, EscherOptRecord.RECORD_ID);
EscherProperty prop = HSLFShape.getEscherProperty(opt, EscherProperties.GEOMETRY__VERTICES);
if (prop != null) {
return new HSLFFreeformShape(spContainer, parent);
}
logger.log(POILogger.INFO, "Creating AutoShape for a NotPrimitive shape");
return new HSLFAutoShape(spContainer, parent);
}
use of org.apache.poi.ddf.AbstractEscherOptRecord in project poi by apache.
the class HSLFSimpleShape method getShadowDistance.
public double getShadowDistance() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.SHADOWSTYLE__OFFSETX);
int offX = (prop == null) ? 0 : prop.getPropertyValue();
prop = getEscherProperty(opt, EscherProperties.SHADOWSTYLE__OFFSETY);
int offY = (prop == null) ? 0 : prop.getPropertyValue();
return Units.toPoints((long) Math.hypot(offX, offY));
}
Aggregations