org.apache.poi.hwmf.record

## Class HwmfText.WmfExtTextOut

- java.lang.Object
- - org.apache.poi.hwmf.record.HwmfText.WmfExtTextOut

- All Implemented Interfaces:
    GenericRecord, HwmfRecord
  Direct Known Subclasses:
    HemfText.EmfExtTextOutA
  Enclosing class:
    HwmfText

      public static class HwmfText.WmfExtTextOut
      extends java.lang.Object
      implements HwmfRecord

  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 and Description
    --- | ---
    `protected java.awt.geom.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.
    `protected java.util.List<java.lang.Integer>` | `dx` An optional array of 16-bit signed integers that indicate the distance between origins of adjacent character cells.
    `protected HwmfText.WmfExtTextOutOptions` | `options` A 16-bit unsigned integer that defines the use of the application-defined rectangle.
    `protected byte[]` | `rawTextBytes` A variable-length string that specifies the text to be drawn.
    `protected java.awt.geom.Point2D` | `reference` The location, in logical units, where the text string is to be placed.
    `protected int` | `stringLength` A 16-bit signed integer that defines the length of the string.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `WmfExtTextOut()`
    `protected` | `WmfExtTextOut(HwmfText.WmfExtTextOutOptions options)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `draw(HwmfGraphics ctx)` Apply the record settings to the graphics context
    `java.awt.geom.Rectangle2D` | `getBounds()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `java.awt.geom.Point2D` | `getReference()`
    `java.lang.String` | `getText(java.nio.charset.Charset charset)`
    `HwmfRecordType` | `getWmfRecordType()`
    `int` | `init(LittleEndianInputStream leis, long recordSize, int recordFunction)` Init record from stream
    `protected boolean` | `isUnicode()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.poi.hwmf.record.HwmfRecord

      `getGenericRecordType`

    - ### Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord

      `getGenericChildren`

- - ### Field Detail

    - #### reference

          protected final java.awt.geom.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 java.awt.geom.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 java.util.List<java.lang.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:
        `getWmfRecordType` in interface `HwmfRecord`

    - #### init

          public int init(LittleEndianInputStream leis,
                          long recordSize,
                          int recordFunction)
                   throws java.io.IOException

      Description copied from interface: `HwmfRecord`
      Init record from stream
      Specified by:
        `init` in interface `HwmfRecord`
      Parameters:
        `leis` - the little endian input stream
      Returns:
        count of processed bytes
      Throws:
        `java.io.IOException`

    - #### draw

          public void draw(HwmfGraphics ctx)

      Description copied from interface: `HwmfRecord`
      Apply the record settings to the graphics context
      Specified by:
        `draw` in interface `HwmfRecord`
      Parameters:
        `ctx` - the graphics context to modify

    - #### getText

          public java.lang.String getText(java.nio.charset.Charset charset)
                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getReference

          public java.awt.geom.Point2D getReference()

    - #### getBounds

          public java.awt.geom.Rectangle2D getBounds()

    - #### isUnicode

          protected boolean isUnicode()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getGenericProperties

          public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.