Package org.apache.poi.hwmf.usermodel
Class HwmfPicture
java.lang.Object
org.apache.poi.hwmf.usermodel.HwmfPicture
- All Implemented Interfaces:
Iterable<HwmfRecord>
,GenericRecord
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Max.static int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D ctx) void
draw
(Graphics2D ctx, Rectangle2D graphicsBounds) Returns the bounding box in device-independent units.Return the image bound in pointsList
<? extends GenericRecord> Returns the bounding box in device-independent units taken from the WmfSetWindowOrg/Ext recordsstatic int
getSize()
Return the image size in pointsiterator()
void
setDefaultCharset
(Charset defaultCharset) static void
setMaxRecordLength
(int length) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericRecordType
-
Field Details
-
DEFAULT_MAX_RECORD_LENGTH
public static final int DEFAULT_MAX_RECORD_LENGTHMax. record length - processing longer records will throw an exception- See Also:
-
MAX_RECORD_LENGTH
public static int MAX_RECORD_LENGTH
-
-
Constructor Details
-
HwmfPicture
- Parameters:
inputStream
- The InputStream to read data from- Throws:
IOException
- If reading data from the file failsRuntimeException
- a number of runtime exceptions can be thrown, especially if there are problems with the input format
-
-
Method Details
-
setMaxRecordLength
public static void setMaxRecordLength(int length) - Parameters:
length
- the max record length allowed for HwmfPicture
-
getMaxRecordLength
public static int getMaxRecordLength()- Returns:
- the max record length allowed for HwmfPicture
-
getRecords
-
draw
-
draw
-
getBounds
Returns the bounding box in device-independent units. Usually this is taken from the placeable header.- Returns:
- the bounding box
- Throws:
RuntimeException
- if neither WmfSetWindowOrg/Ext nor the placeableHeader are set
-
getInnnerBounds
Returns the bounding box in device-independent units taken from the WmfSetWindowOrg/Ext records- Returns:
- the bounding box or null, if the WmfSetWindowOrg/Ext records aren't set
-
getPlaceableHeader
-
getHeader
-
getBoundsInPoints
Return the image bound in points- Returns:
- the image bound in points
-
getSize
Return the image size in points- Returns:
- the image size in points
-
getEmbeddings
-
iterator
- Specified by:
iterator
in interfaceIterable<HwmfRecord>
-
spliterator
- Specified by:
spliterator
in interfaceIterable<HwmfRecord>
-
getGenericProperties
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
getGenericChildren
- Specified by:
getGenericChildren
in interfaceGenericRecord
-
setDefaultCharset
-
getDefaultCharset
-