Class HemfPlusHeader
java.lang.Object
org.apache.poi.hemf.record.emfplus.HemfPlusHeader
- All Implemented Interfaces:
GenericRecord,HemfPlusRecord
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe GraphicsVersion enumeration defines versions of operating system graphics that are used to create EMF+ metafiles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcBounds(HemfRecord.RenderBounds holder) voiddraw(HemfGraphics ctx) Draws the record, the default redirects to the parent WMF record drawinglongintgetFlags()longlonglonginit(LittleEndianInputStream leis, long dataSize, long recordId, int flags) Init record from streambooleanIf 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.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildrenMethods inherited from interface org.apache.poi.hemf.record.emfplus.HemfPlusRecord
getGenericRecordType
-
Constructor Details
-
HemfPlusHeader
public HemfPlusHeader()
-
-
Method Details
-
getEmfPlusRecordType
- Specified by:
getEmfPlusRecordTypein interfaceHemfPlusRecord
-
getFlags
public int getFlags()- Specified by:
getFlagsin interfaceHemfPlusRecord
-
init
public long init(LittleEndianInputStream leis, long dataSize, long recordId, int flags) throws IOException Description copied from interface:HemfPlusRecordInit record from stream- Specified by:
initin interfaceHemfPlusRecord- Parameters:
leis- the little endian input streamdataSize- the size limit for this recordrecordId- the id of theHemfPlusRecordTypeflags- 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:
trueif dual-mode is enabled
-
getEmfPlusFlags
public long getEmfPlusFlags() -
getLogicalDpiX
public long getLogicalDpiX() -
getLogicalDpiY
public long getLogicalDpiY() -
draw
Description copied from interface:HemfPlusRecordDraws the record, the default redirects to the parent WMF record drawing- Specified by:
drawin interfaceHemfPlusRecord- Parameters:
ctx- the drawing context
-
calcBounds
- Specified by:
calcBoundsin interfaceHemfPlusRecord
-
toString
-
getGenericProperties
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-