|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.pixie.wmf.Buffer
org.jfree.pixie.wmf.MfHeader
public class MfHeader
A buffer which represents a Metafile header.
The meta file header has the following structure| offset | length in bytes | name | meaning |
|---|---|---|---|
| 0x00 | 2 | mfType | MetaFile type: 0x1 = memory based meta file, 0x2 = disk based meta file |
| 0x02 | 2 | mfHeader | length of header in words (16bit) |
| 0x04 | 2 | mfVersion | Windows version used to save the file as BCD number. 0x30 for windows 3.0, 0x31 for win3.1 etc. |
| 0x06 | 4 | mfSize | File length in words |
| 0x0A | 2 | mfNoObj | maximum number of objects in the file |
| 0x0c | 4 | mfMaxRec | Maximum record length |
| 0x10 | 2 | mfnoPar | Not used |
| Field Summary | |
|---|---|
static int |
QUALITY_MAYBE
A constant stating that the given file could be a Wmf-File. |
static int |
QUALITY_NO
A constant stating that the given file is not Wmf-File at all. |
static int |
QUALITY_YES
A constant stating that the given file is a Wmf-File. |
| Constructor Summary | |
|---|---|
MfHeader()
|
|
| Method Summary | |
|---|---|
java.awt.Rectangle |
getBBox()
Return the bounding box of this metafile. |
int |
getFileSize()
Gets the file size of the WmfFile. |
int |
getHeaderSize()
Gets the header size. |
int |
getMaxRecordSize()
Gets the size of the largest Record. |
int |
getObjectsSize()
Gets the number of records stored in this metafile. |
int |
getUnitsPerInch()
Gets the defined resolution, if this is an Aldus-File, null otherwise. |
static int |
isMetafile(java.lang.String inName,
java.io.InputStream in)
Is the given input a metafile? We have to guess by reading the header and/or by looking at the file name. |
boolean |
isValid()
Returns true if it looks like a real metafile. |
void |
read(java.io.InputStream in)
Read the header from the given input. |
| Methods inherited from class org.jfree.pixie.wmf.Buffer |
|---|
getByte, getInputStream, getInt, getLength, getShort, getString, move, read, setByte, setCapacity, setInt, setLength, setShort, setString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int QUALITY_NO
public static final int QUALITY_MAYBE
public static final int QUALITY_YES
| Constructor Detail |
|---|
public MfHeader()
| Method Detail |
|---|
public static int isMetafile(java.lang.String inName,
java.io.InputStream in)
inName - the file name of the stream sourcein - the input stream.
public void read(java.io.InputStream in)
throws java.io.IOException
in - the input stream
java.io.IOException - if an error occured.public boolean isValid()
public java.awt.Rectangle getBBox()
public int getUnitsPerInch()
public int getFileSize()
public int getObjectsSize()
public int getMaxRecordSize()
public int getHeaderSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||