Package org.apache.poi.hwmf.record
Class HwmfPenStyle
- java.lang.Object
-
- org.apache.poi.hwmf.record.HwmfPenStyle
-
- All Implemented Interfaces:
Duplicatable,GenericRecord
- Direct Known Subclasses:
HemfPenStyle
public class HwmfPenStyle extends Object implements Duplicatable, GenericRecord
The 16-bit PenStyle Enumeration is used to specify different types of pens that can be used in graphics operations. Various styles can be combined by using a logical OR statement, one from each subsection of Style, EndCap, Join, and Type (Cosmetic). The defaults in case the other values of the subsection aren't set are solid, round end caps, round joins and cosmetic type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHwmfPenStyle.HwmfLineCapstatic classHwmfPenStyle.HwmfLineDashstatic classHwmfPenStyle.HwmfLineJoin
-
Field Summary
Fields Modifier and Type Field Description protected intflagprotected static BitFieldSUBSECTION_ALTERNATEprotected static BitFieldSUBSECTION_DASHprotected static BitFieldSUBSECTION_ENDCAPprotected static BitFieldSUBSECTION_GEOMETRICprotected static BitFieldSUBSECTION_JOIN
-
Constructor Summary
Constructors Constructor Description HwmfPenStyle(int flag)HwmfPenStyle(HwmfPenStyle other)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HwmfPenStylecopy()Map<String,Supplier<?>>getGenericProperties()HwmfPenStyle.HwmfLineCapgetLineCap()HwmfPenStyle.HwmfLineDashgetLineDash()float[]getLineDashes()Convienence method which should be used instead of accessingHwmfPenStyle.HwmfLineDash.dashesdirectly, so an subclass can provide user-style dashesHwmfPenStyle.HwmfLineJoingetLineJoin()booleanisAlternateDash()The pen sets every other pixel (this style is applicable only for cosmetic pens).booleanisGeometric()A pen type that specifies a line with a width that is measured in logical units and a style that can contain any of the attributes of a brush.StringtoString()static HwmfPenStylevalueOf(int flag)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
-
-
-
Field Detail
-
SUBSECTION_DASH
protected static final BitField SUBSECTION_DASH
-
SUBSECTION_ALTERNATE
protected static final BitField SUBSECTION_ALTERNATE
-
SUBSECTION_ENDCAP
protected static final BitField SUBSECTION_ENDCAP
-
SUBSECTION_JOIN
protected static final BitField SUBSECTION_JOIN
-
SUBSECTION_GEOMETRIC
protected static final BitField SUBSECTION_GEOMETRIC
-
flag
protected int flag
-
-
Constructor Detail
-
HwmfPenStyle
public HwmfPenStyle(int flag)
-
HwmfPenStyle
public HwmfPenStyle(HwmfPenStyle other)
-
-
Method Detail
-
valueOf
public static HwmfPenStyle valueOf(int flag)
-
getLineCap
public HwmfPenStyle.HwmfLineCap getLineCap()
-
getLineJoin
public HwmfPenStyle.HwmfLineJoin getLineJoin()
-
getLineDash
public HwmfPenStyle.HwmfLineDash getLineDash()
-
getLineDashes
public float[] getLineDashes()
Convienence method which should be used instead of accessingHwmfPenStyle.HwmfLineDash.dashesdirectly, so an subclass can provide user-style dashes- Returns:
- the dash pattern
-
isAlternateDash
public boolean isAlternateDash()
The pen sets every other pixel (this style is applicable only for cosmetic pens).
-
isGeometric
public boolean isGeometric()
A pen type that specifies a line with a width that is measured in logical units and a style that can contain any of the attributes of a brush.
-
copy
public HwmfPenStyle copy()
- Specified by:
copyin interfaceDuplicatable
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
-