org.apache.poi.hwmf.usermodel

## Class HwmfPicture

- java.lang.Object
- - org.apache.poi.hwmf.usermodel.HwmfPicture

- All Implemented Interfaces:
    java.lang.Iterable<HwmfRecord>, GenericRecord

      public class HwmfPicture
      extends java.lang.Object
      implements java.lang.Iterable<HwmfRecord>, GenericRecord

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `MAX_RECORD_LENGTH` Max.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HwmfPicture(java.io.InputStream inputStream)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `draw(java.awt.Graphics2D ctx)`
    `void` | `draw(java.awt.Graphics2D ctx, java.awt.geom.Rectangle2D graphicsBounds)`
    `java.awt.geom.Rectangle2D` | `getBounds()` Returns the bounding box in device-independent units.
    `java.awt.geom.Rectangle2D` | `getBoundsInPoints()` Return the image bound in points
    `java.lang.Iterable<HwmfEmbedded>` | `getEmbeddings()`
    `java.util.List<? extends GenericRecord>` | `getGenericChildren()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `HwmfHeader` | `getHeader()`
    `java.awt.geom.Rectangle2D` | `getInnnerBounds()` Returns the bounding box in device-independent units taken from the WmfSetWindowOrg/Ext records
    `HwmfPlaceableHeader` | `getPlaceableHeader()`
    `java.util.List<HwmfRecord>` | `getRecords()`
    `java.awt.geom.Dimension2D` | `getSize()` Return the image size in points
    `java.util.Iterator<HwmfRecord>` | `iterator()`
    `java.util.Spliterator<HwmfRecord>` | `spliterator()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

    - ### Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord

      `getGenericRecordType`

- - ### Field Detail

    - #### MAX_RECORD_LENGTH

          public static final int MAX_RECORD_LENGTH

      Max. record length - processing longer records will throw an exception
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HwmfPicture

          public HwmfPicture(java.io.InputStream inputStream)
                      throws java.io.IOException

      Throws:
        `java.io.IOException`

  - ### Method Detail

    - #### getRecords

          public java.util.List<HwmfRecord> getRecords()

    - #### draw

          public void draw(java.awt.Graphics2D ctx)

    - #### draw

          public void draw(java.awt.Graphics2D ctx,
                           java.awt.geom.Rectangle2D graphicsBounds)

    - #### getBounds

          public java.awt.geom.Rectangle2D getBounds()

      Returns the bounding box in device-independent units. Usually this is taken from the placeable header.
      Returns:
        the bounding box
      Throws:
        `java.lang.RuntimeException` - if neither WmfSetWindowOrg/Ext nor the placeableHeader are set

    - #### getInnnerBounds

          public java.awt.geom.Rectangle2D 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

          public HwmfPlaceableHeader getPlaceableHeader()

    - #### getHeader

          public HwmfHeader getHeader()

    - #### getBoundsInPoints

          public java.awt.geom.Rectangle2D getBoundsInPoints()

      Return the image bound in points
      Returns:
        the image bound in points

    - #### getSize

          public java.awt.geom.Dimension2D getSize()

      Return the image size in points
      Returns:
        the image size in points

    - #### getEmbeddings

          public java.lang.Iterable<HwmfEmbedded> getEmbeddings()

    - #### iterator

          public java.util.Iterator<HwmfRecord> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<HwmfRecord>`

    - #### spliterator

          public java.util.Spliterator<HwmfRecord> spliterator()

      Specified by:
        `spliterator` in interface `java.lang.Iterable<HwmfRecord>`

    - #### getGenericProperties

          public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

    - #### getGenericChildren

          public java.util.List<? extends GenericRecord> getGenericChildren()

      Specified by:
        `getGenericChildren` in interface `GenericRecord`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.