Top Description Fields Constructors Methods
org.apache.poi.sl.image

public Class ImageHeaderWMF

extends Object
Class Inheritance
Annotations
@Internal
Imports
java.awt.Dimension, .Rectangle, java.io.IOException, .OutputStream, org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.util.Internal, .LittleEndian, .LittleEndianConsts, .Units

Aldus Placeable Metafile header - 22 byte structure before WMF data.

Field Summary

Modifier and TypeField and Description
public static final int
private final int
private int
private final int
private final int
inch

The number of logical units per inch used to represent the image.

private final int
private static final Logger
private final int
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
public
ImageHeaderWMF(byte[] data, final int off)

Method Summary

Modifier and TypeMethod and Description
public Rectangle
public int
getChecksum()

Returns a checksum value for the previous 10 shorts in the header.

public int
public Dimension
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

APMHEADER_KEYback to summary
public static final int APMHEADER_KEY
bottomback to summary
private final int bottom
checksumback to summary
private int checksum
handleback to summary
private final int handle
Annotations
@SuppressWarnings:unused
inchback to summary
private final int inch

The number of logical units per inch used to represent the image. This value can be used to scale an image. By convention, an image is considered to be recorded at 1440 logical units (twips) per inch. Thus, a value of 720 specifies that the image SHOULD be rendered at twice its normal size, and a value of 2880 specifies that the image SHOULD be rendered at half its normal size.

leftback to summary
private final int left
LOGback to summary
private static final Logger LOG
reservedback to summary
private final int reserved
Annotations
@SuppressWarnings:unused
topback to summary
private final int top

Constructor Detail

ImageHeaderWMFback to summary
public ImageHeaderWMF(Rectangle dim)
ImageHeaderWMFback to summary
public ImageHeaderWMF(byte[] data, final int off)

Method Detail

getBoundsback to summary
public Rectangle getBounds()
getChecksumback to summary
public int getChecksum()

Returns a checksum value for the previous 10 shorts in the header. The checksum is calculated by XORing each short value to an initial value of 0:

getLengthback to summary
public int getLength()
getSizeback to summary
public Dimension getSize()
writeback to summary
public void write(OutputStream out) throws IOException