Class HemfPlusHeader

java.lang.Object
org.apache.poi.hemf.record.emfplus.HemfPlusHeader
All Implemented Interfaces:
GenericRecord, HemfPlusRecord

@Internal public class HemfPlusHeader extends Object implements HemfPlusRecord
  • Constructor Details

    • HemfPlusHeader

      public HemfPlusHeader()
  • Method Details

    • 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 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:
      IOException - when the inputstream is malformed
    • 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
    • calcBounds

      public void calcBounds(HemfRecord.RenderBounds holder)
      Specified by:
      calcBounds in interface HemfPlusRecord
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getGenericProperties

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