org.apache.poi.hemf.record.emf

## Class HemfFill.EmfAlphaBlend

- java.lang.Object
- - org.apache.poi.hemf.record.emf.HemfFill.EmfAlphaBlend

- All Implemented Interfaces:
    GenericRecord, HemfRecord
  Enclosing class:
    HemfFill

      public static class HemfFill.EmfAlphaBlend
      extends java.lang.Object
      implements HemfRecord

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte` | `alphaFormat` A byte that specifies how source and destination pixels are interpreted with respect to alpha transparency.
    `protected HwmfBitmapDib` | `bitmap`
    `protected HwmfColorRef` | `bkColorSrc` the background color of the source bitmap.
    `protected byte` | `blendFlags` This value MUST be 0x00 and MUST be ignored.
    `protected byte` | `blendOperation` The blend operation code.
    `protected java.awt.geom.Rectangle2D` | `bounds` the destination bounding rectangle in device units
    `protected java.awt.geom.Rectangle2D` | `destRect` the destination rectangle
    `protected int` | `srcConstantAlpha` An 8-bit unsigned integer that specifies alpha transparency, which determines the blend of the source and destination bitmaps.
    `protected java.awt.geom.Rectangle2D` | `srcRect` the source rectangle
    `protected HwmfFill.ColorUsage` | `usageSrc` A 32-bit unsigned integer that specifies how to interpret values in the color table in the source bitmap header.
    `protected java.awt.geom.AffineTransform` | `xFormSrc` a world-space to page-space transform to apply to the source bitmap.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EmfAlphaBlend()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HemfRecordType` | `getEmfRecordType()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `long` | `init(LittleEndianInputStream leis, long recordSize, long recordId)` Init record from stream

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

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

    - ### Methods inherited from interface org.apache.poi.hemf.record.emf.HemfRecord

      `draw, getGenericRecordType, setHeader`

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

      `getGenericChildren`

- - ### Field Detail

    - #### bounds

          protected final java.awt.geom.Rectangle2D bounds

      the destination bounding rectangle in device units

    - #### destRect

          protected final java.awt.geom.Rectangle2D destRect

      the destination rectangle

    - #### srcRect

          protected final java.awt.geom.Rectangle2D srcRect

      the source rectangle

    - #### blendOperation

          protected byte blendOperation

      The blend operation code. The only source and destination blend operation that has been defined is 0x00, which specifies that the source bitmap MUST be combined with the destination bitmap based on the alpha transparency values of the source pixels.

    - #### blendFlags

          protected byte blendFlags

      This value MUST be 0x00 and MUST be ignored.

    - #### srcConstantAlpha

          protected int srcConstantAlpha

      An 8-bit unsigned integer that specifies alpha transparency, which determines the blend of the source and destination bitmaps. This value MUST be used on the entire source bitmap. The minimum alpha transparency value, zero, corresponds to completely transparent; the maximum value, 0xFF, corresponds to completely opaque. In effect, a value of 0xFF specifies that the per-pixel alpha values determine the blend of the source and destination bitmaps.

    - #### alphaFormat

          protected byte alphaFormat

      A byte that specifies how source and destination pixels are interpreted with respect to alpha transparency. 0x00: The pixels in the source bitmap do not specify alpha transparency. In this case, the SrcConstantAlpha value determines the blend of the source and destination bitmaps. Note that in the following equations SrcConstantAlpha is divided by 255, which produces a value in the range 0 to 1. 0x01: "AC_SRC_ALPHA" Indicates that the source bitmap is 32 bits-per-pixel and specifies an alpha transparency value for each pixel.

    - #### xFormSrc

          protected final java.awt.geom.AffineTransform xFormSrc

      a world-space to page-space transform to apply to the source bitmap.

    - #### bkColorSrc

          protected final HwmfColorRef bkColorSrc

      the background color of the source bitmap.

    - #### usageSrc

          protected HwmfFill.ColorUsage usageSrc

      A 32-bit unsigned integer that specifies how to interpret values in the color table in the source bitmap header.

    - #### bitmap

          protected final HwmfBitmapDib bitmap

  - ### Constructor Detail

    - #### EmfAlphaBlend

          public EmfAlphaBlend()

  - ### Method Detail

    - #### getEmfRecordType

          public HemfRecordType getEmfRecordType()

      Specified by:
        `getEmfRecordType` in interface `HemfRecord`

    - #### init

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

      Description copied from interface: `HemfRecord`
      Init record from stream
      Specified by:
        `init` in interface `HemfRecord`
      Parameters:
        `leis` - the little endian input stream
        `recordSize` - the size limit for this record
        `recordId` - the id of the `HemfRecordType`
      Returns:
        count of processed bytes
      Throws:
        `java.io.IOException` - when the inputstream is malformed

    - #### 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.