use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getLineBackgroundColor.
/**
* @return background color of the line. If color is not set returns {@code null}
*/
public Color getLineBackgroundColor() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty p = getEscherProperty(opt, EscherProperties.LINESTYLE__NOLINEDRAWDASH);
if (p != null && (p.getPropertyValue() & 0x8) == 0) {
return null;
}
Color clr = getColor(EscherProperties.LINESTYLE__BACKCOLOR, EscherProperties.LINESTYLE__OPACITY, -1);
return clr == null ? null : clr;
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFSimpleShape method getShadowAngle.
public double getShadowAngle() {
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 Math.toDegrees(Math.atan2(offY, offX));
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFFill method getForegroundColor.
/**
* Foreground color
*/
public Color getForegroundColor() {
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__FILLCOLOR, EscherProperties.FILL__FILLOPACITY, -1);
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFTextShape method getWordWrapEx.
/**
* Returns the value indicating word wrap.
*
* @return the value indicating word wrap.
* Must be one of the <code>Wrap*</code> constants defined in this class.
*
* @see <a href="https://msdn.microsoft.com/en-us/library/dd948168(v=office.12).aspx">MSOWRAPMODE</a>
*/
public int getWordWrapEx() {
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.TEXT__WRAPTEXT);
return prop == null ? WrapSquare : prop.getPropertyValue();
}
use of org.apache.poi.ddf.EscherSimpleProperty in project poi by apache.
the class HSLFTextShape method getTextRotation.
@Override
public Double getTextRotation() {
// see 2.4.6 MSOCDIR
AbstractEscherOptRecord opt = getEscherOptRecord();
EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.TEXT__FONTROTATION);
return (prop == null) ? null : (90. * prop.getPropertyValue());
}
Aggregations