org.apache.poi.hemf.record.emfplus

## Class HemfPlusHeader

- java.lang.Object
- - org.apache.poi.hemf.record.emfplus.HemfPlusHeader

- All Implemented Interfaces:
    GenericRecord, HemfPlusRecord

      @Internal
      public class HemfPlusHeader
      extends java.lang.Object
      implements HemfPlusRecord

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HemfPlusHeader.EmfPlusGraphicsVersion`
    `static class` | `HemfPlusHeader.GraphicsVersion` The GraphicsVersion enumeration defines versions of operating system graphics that are used to create EMF+ metafiles.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HemfPlusHeader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `draw(HemfGraphics ctx)` Draws the record, the default redirects to the parent WMF record drawing
    `long` | `getEmfPlusFlags()`
    `HemfPlusRecordType` | `getEmfPlusRecordType()`
    `int` | `getFlags()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `long` | `getLogicalDpiX()`
    `long` | `getLogicalDpiY()`
    `HemfPlusHeader.EmfPlusGraphicsVersion` | `getVersion()`
    `long` | `init(LittleEndianInputStream leis, long dataSize, long recordId, int flags)` Init record from stream
    `boolean` | `isEmfPlusDualMode()` If set, this flag indicates that this metafile is "dual-mode", which means that it contains two sets of records, each of which completely specifies the graphics content.
    `java.lang.String` | `toString()`

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

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

    - ### Methods inherited from interface org.apache.poi.hemf.record.emfplus.HemfPlusRecord

      `getGenericRecordType`

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

      `getGenericChildren`

- - ### Constructor Detail

    - #### HemfPlusHeader

          public HemfPlusHeader()

  - ### Method Detail

    - #### getEmfPlusRecordType

          public HemfPlusRecordType getEmfPlusRecordType()

      Specified by:
        `getEmfPlusRecordType` in interface `HemfPlusRecord`

    - #### getFlags

          public int getFlags()

      Specified by:
        `getFlags` in interface `HemfPlusRecord`

    - #### init

          public long init(LittleEndianInputStream leis,
                           long dataSize,
                           long recordId,
                           int flags)
                    throws java.io.IOException

      Description copied from interface: `HemfPlusRecord`
      Init record from stream
      Specified by:
        `init` in interface `HemfPlusRecord`
      Parameters:
        `leis` - the little endian input stream
        `dataSize` - the size limit for this record
        `recordId` - the id of the `HemfPlusRecordType`
        `flags` - the record flags
      Returns:
        count of processed bytes
      Throws:
        `java.io.IOException` - when the inputstream is malformed

    - #### getVersion

          public HemfPlusHeader.EmfPlusGraphicsVersion getVersion()

    - #### isEmfPlusDualMode

          public boolean isEmfPlusDualMode()

      If set, this flag indicates that this metafile is "dual-mode", which means that it contains two sets of records, each of which completely specifies the graphics content. If clear, the graphics content is specified by EMF+ records, and possibly EMF records that are preceded by an EmfPlusGetDC record. If this flag is set, EMF records alone SHOULD suffice to define the graphics content. Note that whether the "dual-mode" flag is set or not, some EMF records are always present, namely EMF control records and the EMF records that contain EMF+ records.
      Returns:
        `true` if dual-mode is enabled

    - #### getEmfPlusFlags

          public long getEmfPlusFlags()

    - #### getLogicalDpiX

          public long getLogicalDpiX()

    - #### getLogicalDpiY

          public long getLogicalDpiY()

    - #### draw

          public void draw(HemfGraphics ctx)

      Description copied from interface: `HemfPlusRecord`
      Draws the record, the default redirects to the parent WMF record drawing
      Specified by:
        `draw` in interface `HemfPlusRecord`
      Parameters:
        `ctx` - the drawing context

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getGenericProperties

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

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

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