org.apache.poi.hemf.draw

## Class HemfGraphics

- java.lang.Object
- - org.apache.poi.hwmf.draw.HwmfGraphics
  - - org.apache.poi.hemf.draw.HemfGraphics

-     public class HemfGraphics
      extends HwmfGraphics

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HemfGraphics.EmfRenderState`

    - ### Nested classes/interfaces inherited from class org.apache.poi.hwmf.draw.HwmfGraphics

      `HwmfGraphics.FillDrawStyle`

  - ### Field Summary

    - ### Fields inherited from class org.apache.poi.hwmf.draw.HwmfGraphics

      `graphicsCtx, objectIndexes, objectTable, prop`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HemfGraphics(java.awt.Graphics2D graphicsCtx, java.awt.geom.Rectangle2D bbox)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addObjectTableEntry(HwmfObjectTableEntry entry, int index)` Adds or sets an record of type `HwmfObjectTableEntry` to the object table.
    `void` | `addPlusObjectTableEntry(HwmfObjectTableEntry entry, int index)` Adds or sets an record of type `HwmfObjectTableEntry` to the plus object table.
    `void` | `applyObjectTableEntry(int index)` Applies the object table entry
    `void` | `applyPlusObjectTableEntry(int index)`
    `void` | `draw(java.util.function.Consumer<java.awt.geom.Path2D> pathConsumer, HwmfGraphics.FillDrawStyle fillDraw)`
    `void` | `draw(HemfPlusRecord r)`
    `void` | `draw(HemfRecord r)`
    `void` | `fill(java.awt.Shape shape)`
    `protected java.awt.Paint` | `getHatchedFill()`
    `protected java.awt.Paint` | `getLinearGradient()`
    `HwmfObjectTableEntry` | `getObjectTableEntry(int index)` Gets a record which was registered earlier
    `HwmfObjectTableEntry` | `getPlusObjectTableEntry(int index)`
    `HemfDrawProperties` | `getProperties()`
    `HemfGraphics.EmfRenderState` | `getRenderState()`
    `protected HemfDrawProperties` | `newProperties(HwmfDrawProperties oldProps)`
    `void` | `restorePlusProperties(int index)` Restores the properties from the plus stack
    `void` | `savePlusProperties(int index)` Saves the current properties to the plus stack
    `void` | `setRenderState(HemfGraphics.EmfRenderState renderState)`
    `void` | `updateWindowMapMode()` After setting various window and viewport related properties, the underlying graphics context needs to be adapted.

    - ### Methods inherited from class org.apache.poi.hwmf.draw.HwmfGraphics

      `addObjectTableEntry, draw, drawImage, drawImage, drawString, drawString, getFill, getImageRenderer, getInitTransform, getPatternPaint, getSolidFill, getStroke, getTransform, restoreProperties, saveProperties, setClip, setTransform, unsetObjectTableEntry`

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

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

- - ### Constructor Detail

    - #### HemfGraphics

          public HemfGraphics(java.awt.Graphics2D graphicsCtx,
                              java.awt.geom.Rectangle2D bbox)

  - ### Method Detail

    - #### getProperties

          public HemfDrawProperties getProperties()

      Overrides:
        `getProperties` in class `HwmfGraphics`

    - #### newProperties

          protected HemfDrawProperties newProperties(HwmfDrawProperties oldProps)

      Overrides:
        `newProperties` in class `HwmfGraphics`

    - #### getRenderState

          public HemfGraphics.EmfRenderState getRenderState()

    - #### setRenderState

          public void setRenderState(HemfGraphics.EmfRenderState renderState)

    - #### draw

          public void draw(HemfRecord r)

    - #### draw

          public void draw(HemfPlusRecord r)

    - #### draw

          @Internal
          public void draw(java.util.function.Consumer<java.awt.geom.Path2D> pathConsumer,
                                     HwmfGraphics.FillDrawStyle fillDraw)

    - #### addObjectTableEntry

          public void addObjectTableEntry(HwmfObjectTableEntry entry,
                                          int index)

      Adds or sets an record of type `HwmfObjectTableEntry` to the object table. The index must be > 0
      Parameters:
        `entry` - the record to be stored
        `index` - the index to be overwritten, regardless if its content was unset before
      See Also:
        `HwmfGraphics.addObjectTableEntry(HwmfObjectTableEntry)`

    - #### addPlusObjectTableEntry

          public void addPlusObjectTableEntry(HwmfObjectTableEntry entry,
                                              int index)

      Adds or sets an record of type `HwmfObjectTableEntry` to the plus object table. The index must be in the range [0..63]
      Parameters:
        `entry` - the record to be stored
        `index` - the index to be overwritten, regardless if its content was unset before
      See Also:
        `HwmfGraphics.addObjectTableEntry(HwmfObjectTableEntry)`

    - #### getObjectTableEntry

          public HwmfObjectTableEntry getObjectTableEntry(int index)

      Gets a record which was registered earlier
      Parameters:
        `index` - the record index
      Returns:
        the record or `null` if it doesn't exist

    - #### getPlusObjectTableEntry

          public HwmfObjectTableEntry getPlusObjectTableEntry(int index)

    - #### applyObjectTableEntry

          public void applyObjectTableEntry(int index)

      Description copied from class: `HwmfGraphics`
      Applies the object table entry
      Overrides:
        `applyObjectTableEntry` in class `HwmfGraphics`
      Parameters:
        `index` - the index of the object table entry (0-based)

    - #### applyPlusObjectTableEntry

          public void applyPlusObjectTableEntry(int index)

    - #### getHatchedFill

          protected java.awt.Paint getHatchedFill()

      Overrides:
        `getHatchedFill` in class `HwmfGraphics`

    - #### updateWindowMapMode

          public void updateWindowMapMode()

      Description copied from class: `HwmfGraphics`
      After setting various window and viewport related properties, the underlying graphics context needs to be adapted. This methods gathers and sets the corresponding graphics transformations.
      Overrides:
        `updateWindowMapMode` in class `HwmfGraphics`

    - #### fill

          public void fill(java.awt.Shape shape)

      Overrides:
        `fill` in class `HwmfGraphics`

    - #### getLinearGradient

          protected java.awt.Paint getLinearGradient()

      Overrides:
        `getLinearGradient` in class `HwmfGraphics`

    - #### savePlusProperties

          public void savePlusProperties(int index)

      Saves the current properties to the plus stack

    - #### restorePlusProperties

          public void restorePlusProperties(int index)

      Restores the properties from the plus stack
      Parameters:
        `index` - the index of the previously saved properties

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