Package org.apache.poi.hemf.usermodel
Class HemfPicture
- java.lang.Object
-
- org.apache.poi.hemf.usermodel.HemfPicture
-
- All Implemented Interfaces:
java.lang.Iterable<HemfRecord>
,GenericRecord
@Internal public class HemfPicture extends java.lang.Object implements java.lang.Iterable<HemfRecord>, GenericRecord
Read-only EMF extractor. Lots remain
-
-
Constructor Summary
Constructors Constructor Description HemfPicture(java.io.InputStream is)
HemfPicture(LittleEndianInputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw(java.awt.Graphics2D ctx, java.awt.geom.Rectangle2D graphicsBounds)
void
forEach(java.util.function.Consumer<? super HemfRecord> action)
java.awt.geom.Rectangle2D
getBounds()
Returns the bounding box in device-independent units - usually this is in .01 millimeter unitsjava.awt.geom.Rectangle2D
getBoundsInPoints()
Return the image bounds in pointsjava.nio.charset.Charset
getDefaultCharset()
java.lang.Iterable<HwmfEmbedded>
getEmbeddings()
java.util.List<? extends GenericRecord>
getGenericChildren()
java.util.Map<java.lang.String,java.util.function.Supplier<?>>
getGenericProperties()
HemfHeader
getHeader()
void
getInnerBounds(java.awt.geom.Rectangle2D window, java.awt.geom.Rectangle2D viewport, java.awt.geom.Rectangle2D bounds)
java.util.List<HemfRecord>
getRecords()
java.awt.geom.Dimension2D
getSize()
Return the image size in pointsjava.util.Iterator<HemfRecord>
iterator()
void
setDefaultCharset(java.nio.charset.Charset defaultCharset)
java.util.Spliterator<HemfRecord>
spliterator()
-
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
-
-
-
-
Constructor Detail
-
HemfPicture
public HemfPicture(java.io.InputStream is)
-
HemfPicture
public HemfPicture(LittleEndianInputStream is)
-
-
Method Detail
-
getHeader
public HemfHeader getHeader()
-
getRecords
public java.util.List<HemfRecord> getRecords()
-
iterator
public java.util.Iterator<HemfRecord> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<HemfRecord>
-
spliterator
public java.util.Spliterator<HemfRecord> spliterator()
- Specified by:
spliterator
in interfacejava.lang.Iterable<HemfRecord>
-
forEach
public void forEach(java.util.function.Consumer<? super HemfRecord> action)
- Specified by:
forEach
in interfacejava.lang.Iterable<HemfRecord>
-
getBounds
public java.awt.geom.Rectangle2D getBounds()
Returns the bounding box in device-independent units - usually this is in .01 millimeter units- Returns:
- the bounding box in device-independent units
-
getInnerBounds
public void getInnerBounds(java.awt.geom.Rectangle2D window, java.awt.geom.Rectangle2D viewport, java.awt.geom.Rectangle2D bounds)
-
getBoundsInPoints
public java.awt.geom.Rectangle2D getBoundsInPoints()
Return the image bounds in points- Returns:
- the image bounds in points
-
getSize
public java.awt.geom.Dimension2D getSize()
Return the image size in points- Returns:
- the image size in points
-
draw
public void draw(java.awt.Graphics2D ctx, java.awt.geom.Rectangle2D graphicsBounds)
- Parameters:
ctx
- The Graphics-context to draw ongraphicsBounds
- A rectangle which describes the bounds for drawing- Throws:
java.lang.IllegalStateException
- if the draw fails
-
getEmbeddings
public java.lang.Iterable<HwmfEmbedded> getEmbeddings()
-
getGenericChildren
public java.util.List<? extends GenericRecord> getGenericChildren()
- Specified by:
getGenericChildren
in interfaceGenericRecord
-
getGenericProperties
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
setDefaultCharset
public void setDefaultCharset(java.nio.charset.Charset defaultCharset)
-
getDefaultCharset
public java.nio.charset.Charset getDefaultCharset()
-
-