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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHemfPlusHeader.EmfPlusGraphicsVersionstatic classHemfPlusHeader.GraphicsVersionThe GraphicsVersion enumeration defines versions of operating system graphics that are used to create EMF+ metafiles.
-
Constructor Summary
Constructors Constructor Description HemfPlusHeader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalcBounds(HemfRecord.RenderBounds holder)voiddraw(HemfGraphics ctx)Draws the record, the default redirects to the parent WMF record drawinglonggetEmfPlusFlags()HemfPlusRecordTypegetEmfPlusRecordType()intgetFlags()Map<String,Supplier<?>>getGenericProperties()longgetLogicalDpiX()longgetLogicalDpiY()HemfPlusHeader.EmfPlusGraphicsVersiongetVersion()longinit(LittleEndianInputStream leis, long dataSize, long recordId, int flags)Init record from streambooleanisEmfPlusDualMode()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.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Methods inherited from interface org.apache.poi.hemf.record.emfplus.HemfPlusRecord
getGenericRecordType
-
-
-
-
Method Detail
-
getEmfPlusRecordType
public HemfPlusRecordType 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
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:
trueif 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:HemfPlusRecordDraws the record, the default redirects to the parent WMF record drawing- Specified by:
drawin interfaceHemfPlusRecord- Parameters:
ctx- the drawing context
-
calcBounds
public void calcBounds(HemfRecord.RenderBounds holder)
- Specified by:
calcBoundsin interfaceHemfPlusRecord
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
-