Package org.apache.poi.hemf.usermodel
Class HemfPicture
- java.lang.Object
-
- org.apache.poi.hemf.usermodel.HemfPicture
-
- All Implemented Interfaces:
Iterable<HemfRecord>,GenericRecord
@Internal public class HemfPicture extends Object implements Iterable<HemfRecord>, GenericRecord
Read-only EMF extractor. Lots remain
-
-
Constructor Summary
Constructors Constructor Description HemfPicture(InputStream is)HemfPicture(LittleEndianInputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(Graphics2D ctx, Rectangle2D graphicsBounds)voidforEach(Consumer<? super HemfRecord> action)Rectangle2DgetBounds()Returns the bounding box in device-independent units - usually this is in .01 millimeter unitsRectangle2DgetBoundsInPoints()Return the image bounds in pointsCharsetgetDefaultCharset()Iterable<HwmfEmbedded>getEmbeddings()List<? extends GenericRecord>getGenericChildren()Map<String,Supplier<?>>getGenericProperties()HemfHeadergetHeader()voidgetInnerBounds(Rectangle2D window, Rectangle2D viewport, Rectangle2D bounds)List<HemfRecord>getRecords()Dimension2DgetSize()Return the image size in pointsIterator<HemfRecord>iterator()voidsetDefaultCharset(Charset defaultCharset)Spliterator<HemfRecord>spliterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericRecordType
-
-
-
-
Constructor Detail
-
HemfPicture
public HemfPicture(InputStream is)
-
HemfPicture
public HemfPicture(LittleEndianInputStream is)
-
-
Method Detail
-
getHeader
public HemfHeader getHeader()
-
getRecords
public List<HemfRecord> getRecords()
-
iterator
public Iterator<HemfRecord> iterator()
- Specified by:
iteratorin interfaceIterable<HemfRecord>
-
spliterator
public Spliterator<HemfRecord> spliterator()
- Specified by:
spliteratorin interfaceIterable<HemfRecord>
-
forEach
public void forEach(Consumer<? super HemfRecord> action)
- Specified by:
forEachin interfaceIterable<HemfRecord>
-
getBounds
public 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(Rectangle2D window, Rectangle2D viewport, Rectangle2D bounds)
-
getBoundsInPoints
public Rectangle2D getBoundsInPoints()
Return the image bounds in points- Returns:
- the image bounds in points
-
getSize
public Dimension2D getSize()
Return the image size in points- Returns:
- the image size in points
-
draw
public void draw(Graphics2D ctx, Rectangle2D graphicsBounds)
- Parameters:
ctx- The Graphics-context to draw ongraphicsBounds- A rectangle which describes the bounds for drawing- Throws:
IllegalStateException- if the draw fails
-
getEmbeddings
public Iterable<HwmfEmbedded> getEmbeddings()
-
getGenericChildren
public List<? extends GenericRecord> getGenericChildren()
- Specified by:
getGenericChildrenin interfaceGenericRecord
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
setDefaultCharset
public void setDefaultCharset(Charset defaultCharset)
-
getDefaultCharset
public Charset getDefaultCharset()
-
-