Package org.apache.poi.hemf.record.emf
Class HemfText.EmfExtTextOutA
- java.lang.Object
-
- org.apache.poi.hwmf.record.HwmfText.WmfExtTextOut
-
- org.apache.poi.hemf.record.emf.HemfText.EmfExtTextOutA
-
- All Implemented Interfaces:
GenericRecord,HemfRecord,HwmfRecord,HwmfCharsetAware
- Direct Known Subclasses:
HemfText.EmfExtTextOutW
- Enclosing class:
- HemfText
public static class HemfText.EmfExtTextOutA extends HwmfText.WmfExtTextOut implements HemfRecord
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.poi.hemf.record.emf.HemfRecord
HemfRecord.RenderBounds
-
-
Field Summary
Fields Modifier and Type Field Description protected Rectangle2DboundsIgnoredprotected HemfText.EmfGraphicsModegraphicsModeprotected Dimension2DscaleThe scale factor to apply along the X/Y axis to convert from page space units to .01mm units.-
Fields inherited from class org.apache.poi.hwmf.record.HwmfText.WmfExtTextOut
bounds, charsetProvider, dx, options, rawTextBytes, reference, stringLength
-
-
Constructor Summary
Constructors Constructor Description EmfExtTextOutA()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(HwmfGraphics ctx)Apply the record settings to the graphics contextHemfRecordTypegetEmfRecordType()Map<String,Supplier<?>>getGenericProperties()HemfRecordTypegetGenericRecordType()HemfText.EmfGraphicsModegetGraphicsMode()Dimension2DgetScale()StringgetText(Charset charset)To be implemented! We need to get the current character set from the current font forHemfText.EmfExtTextOutA, which has to be tracked in the playback device.longinit(LittleEndianInputStream leis, long recordSize, long recordId)Init record from streamStringtoString()-
Methods inherited from class org.apache.poi.hwmf.record.HwmfText.WmfExtTextOut
getBounds, getOptions, getReference, getWmfRecordType, init, isUnicode, setCharsetProvider
-
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.emf.HemfRecord
calcBounds, draw, setHeader
-
-
-
-
Field Detail
-
boundsIgnored
protected Rectangle2D boundsIgnored
-
graphicsMode
protected HemfText.EmfGraphicsMode graphicsMode
-
scale
protected final Dimension2D scale
The scale factor to apply along the X/Y axis to convert from page space units to .01mm units. This SHOULD be used only if the graphics mode specified by iGraphicsMode is GM_COMPATIBLE.
-
-
Method Detail
-
getEmfRecordType
public HemfRecordType getEmfRecordType()
- Specified by:
getEmfRecordTypein interfaceHemfRecord
-
init
public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException
Description copied from interface:HemfRecordInit record from stream- Specified by:
initin interfaceHemfRecord- Parameters:
leis- the little endian input streamrecordSize- the size limit for this recordrecordId- the id of theHemfRecordType- Returns:
- count of processed bytes
- Throws:
IOException- when the inputstream is malformed
-
getText
public String getText(Charset charset) throws IOException
To be implemented! We need to get the current character set from the current font forHemfText.EmfExtTextOutA, which has to be tracked in the playback device. ForHemfText.EmfExtTextOutW, the charset is "UTF-16LE"- Overrides:
getTextin classHwmfText.WmfExtTextOut- Parameters:
charset- the charset to be used to decode the character bytes- Returns:
- text from this text element
- Throws:
IOException- if the charset is not compatible to the underlying bytes
-
getGraphicsMode
public HemfText.EmfGraphicsMode getGraphicsMode()
-
getScale
public Dimension2D getScale()
-
draw
public void draw(HwmfGraphics ctx)
Description copied from interface:HwmfRecordApply the record settings to the graphics context- Specified by:
drawin interfaceHwmfRecord- Overrides:
drawin classHwmfText.WmfExtTextOut- Parameters:
ctx- the graphics context to modify
-
toString
public String toString()
- Overrides:
toStringin classHwmfText.WmfExtTextOut
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord- Overrides:
getGenericPropertiesin classHwmfText.WmfExtTextOut
-
getGenericRecordType
public HemfRecordType getGenericRecordType()
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein interfaceHemfRecord- Specified by:
getGenericRecordTypein interfaceHwmfRecord
-
-