Package 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 Object 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 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 Rectangle2D
bounds
the destination bounding rectangle in device unitsprotected Rectangle2D
destRect
the destination rectangleprotected int
srcConstantAlpha
An 8-bit unsigned integer that specifies alpha transparency, which determines the blend of the source and destination bitmaps.protected Rectangle2D
srcRect
the source rectangleprotected HwmfFill.ColorUsage
usageSrc
A 32-bit unsigned integer that specifies how to interpret values in the color table in the source bitmap header.protected AffineTransform
xFormSrc
a world-space to page-space transform to apply to the source bitmap.
-
Constructor Summary
Constructors Constructor Description EmfAlphaBlend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HemfRecordType
getEmfRecordType()
Map<String,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.common.usermodel.GenericRecord
getGenericChildren
-
Methods inherited from interface org.apache.poi.hemf.record.emf.HemfRecord
calcBounds, draw, getGenericRecordType, setHeader
-
-
-
-
Field Detail
-
bounds
protected final Rectangle2D bounds
the destination bounding rectangle in device units
-
destRect
protected final Rectangle2D destRect
the destination rectangle
-
srcRect
protected final 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 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
-
-
Method Detail
-
getEmfRecordType
public HemfRecordType getEmfRecordType()
- Specified by:
getEmfRecordType
in interfaceHemfRecord
-
init
public long init(LittleEndianInputStream leis, long recordSize, long recordId) throws IOException
Description copied from interface:HemfRecord
Init record from stream- Specified by:
init
in 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
-
getGenericProperties
public Map<String,Supplier<?>> getGenericProperties()
- Specified by:
getGenericProperties
in interfaceGenericRecord
-
-