Package org.apache.poi.hwmf.record
Class HwmfText.WmfExtTextOut
- java.lang.Object
-
- org.apache.poi.hwmf.record.HwmfText.WmfExtTextOut
-
- All Implemented Interfaces:
GenericRecord,HwmfRecord,HwmfCharsetAware
- Direct Known Subclasses:
HemfText.EmfExtTextOutA
- Enclosing class:
- HwmfText
public static class HwmfText.WmfExtTextOut extends Object implements HwmfRecord, HwmfCharsetAware
The META_EXTTEXTOUT record outputs text by using the font, background color, and text color that are defined in the playback device context. Optionally, dimensions can be provided for clipping, opaquing, or both.
-
-
Field Summary
Fields Modifier and Type Field Description protected Rectangle2DboundsAn optional 8-byte Rect Object (section 2.2.2.18) that defines the dimensions, in logical coordinates, of a rectangle that is used for clipping, opaquing, or both.protected Supplier<Charset>charsetProviderprotected List<Integer>dxAn optional array of 16-bit signed integers that indicate the distance between origins of adjacent character cells.protected HwmfText.WmfExtTextOutOptionsoptionsA 16-bit unsigned integer that defines the use of the application-defined rectangle.protected byte[]rawTextBytesA variable-length string that specifies the text to be drawn.protected Point2DreferenceThe location, in logical units, where the text string is to be placed.protected intstringLengthA 16-bit signed integer that defines the length of the string.
-
Constructor Summary
Constructors Modifier Constructor Description WmfExtTextOut()protectedWmfExtTextOut(HwmfText.WmfExtTextOutOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(HwmfGraphics ctx)Apply the record settings to the graphics contextRectangle2DgetBounds()Map<String,Supplier<?>>getGenericProperties()HwmfText.WmfExtTextOutOptionsgetOptions()Point2DgetReference()StringgetText(Charset charset)HwmfRecordTypegetWmfRecordType()intinit(LittleEndianInputStream leis, long recordSize, int recordFunction)Init record from streamprotected booleanisUnicode()voidsetCharsetProvider(Supplier<Charset> provider)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.hwmf.record.HwmfRecord
getGenericRecordType
-
-
-
-
Field Detail
-
reference
protected final Point2D reference
The location, in logical units, where the text string is to be placed.
-
stringLength
protected int stringLength
A 16-bit signed integer that defines the length of the string.
-
options
protected final HwmfText.WmfExtTextOutOptions options
A 16-bit unsigned integer that defines the use of the application-defined rectangle. This member can be a combination of one or more values in the ExtTextOutOptions Flags (ETO_*)
-
bounds
protected final Rectangle2D bounds
An optional 8-byte Rect Object (section 2.2.2.18) that defines the dimensions, in logical coordinates, of a rectangle that is used for clipping, opaquing, or both. The corners are given in the order left, top, right, bottom. Each value is a 16-bit signed integer that defines the coordinate, in logical coordinates, of the upper-left corner of the rectangle
-
rawTextBytes
protected byte[] rawTextBytes
A variable-length string that specifies the text to be drawn. The string does not need to be null-terminated, because StringLength specifies the length of the string. If the length is odd, an extra byte is placed after it so that the following member (optional Dx) is aligned on a 16-bit boundary.
-
dx
protected final List<Integer> dx
An optional array of 16-bit signed integers that indicate the distance between origins of adjacent character cells. For example, Dx[i] logical units separate the origins of character cell i and character cell i + 1. If this field is present, there MUST be the same number of values as there are characters in the string.
-
-
Constructor Detail
-
WmfExtTextOut
public WmfExtTextOut()
-
WmfExtTextOut
protected WmfExtTextOut(HwmfText.WmfExtTextOutOptions options)
-
-
Method Detail
-
getWmfRecordType
public HwmfRecordType getWmfRecordType()
- Specified by:
getWmfRecordTypein interfaceHwmfRecord
-
init
public int init(LittleEndianInputStream leis, long recordSize, int recordFunction) throws IOException
Description copied from interface:HwmfRecordInit record from stream- Specified by:
initin interfaceHwmfRecord- Parameters:
leis- the little endian input stream- Returns:
- count of processed bytes
- Throws:
IOException
-
draw
public void draw(HwmfGraphics ctx)
Description copied from interface:HwmfRecordApply the record settings to the graphics context- Specified by:
drawin interfaceHwmfRecord- Parameters:
ctx- the graphics context to modify
-
getText
public String getText(Charset charset) throws IOException
- Throws:
IOException
-
getReference
public Point2D getReference()
-
getBounds
public Rectangle2D getBounds()
-
getOptions
public HwmfText.WmfExtTextOutOptions getOptions()
-
isUnicode
protected boolean isUnicode()
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
setCharsetProvider
public void setCharsetProvider(Supplier<Charset> provider)
- Specified by:
setCharsetProviderin interfaceHwmfCharsetAware
-
-