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 Details

  • Method Details

    • setMaxRecordLength

      public static void setMaxRecordLength(int length)
      Parameters:
      length - the max record length allowed for HemfPicture
      Since:
      2.0.0
    • getMaxRecordLength

      public static int getMaxRecordLength()
      Returns:
      the max record length allowed for HemfPicture
      Since:
      2.0.0
    • safelyAllocateCheck

      public static void safelyAllocateCheck(long length)
    • getHeader

      public HemfHeader getHeader()
    • getRecords

      public List<HemfRecord> getRecords()
    • iterator

      public Iterator<HemfRecord> iterator()
      Specified by:
      iterator in interface Iterable<HemfRecord>
    • spliterator

      public Spliterator<HemfRecord> spliterator()
      Specified by:
      spliterator in interface Iterable<HemfRecord>
    • forEach

      public void forEach(Consumer<? super HemfRecord> action)
      Specified by:
      forEach in interface Iterable<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 on
      graphicsBounds - 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:
      getGenericChildren in interface GenericRecord
    • getGenericProperties

      public Map<String,Supplier<?>> getGenericProperties()
      Specified by:
      getGenericProperties in interface GenericRecord
    • setDefaultCharset

      public void setDefaultCharset(Charset defaultCharset)
    • getDefaultCharset

      public Charset getDefaultCharset()