|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.transcoder.wmf.tosvg.AbstractWMFReader
org.apache.batik.transcoder.wmf.tosvg.WMFHeaderProperties
public class WMFHeaderProperties
This class holds simple properties about a WMF Metafile. It can be used whenever general information must be retrieved about this file.
Field Summary | |
---|---|
static int |
BRUSH
|
static int |
FONT
|
static int |
NULL_BRUSH
|
static int |
NULL_PEN
|
static int |
OBJ_BITMAP
|
static int |
OBJ_REGION
|
static int |
PALETTE
|
static int |
PEN
|
protected java.io.DataInputStream |
stream
|
Fields inherited from class org.apache.batik.transcoder.wmf.tosvg.AbstractWMFReader |
---|
bottom, bReading, height, inch, isAldus, isotropic, lastObjectIdx, left, MM_PER_PIXEL, mtHeaderSize, mtMaxRecord, mtNoObjects, mtNoParameters, mtSize, mtType, mtVersion, numObjects, objectVector, PIXEL_PER_INCH, right, scaleX, scaleXY, scaleY, top, vpH, vpW, vpX, vpY, width, windowHeight, windowWidth, xSign, ySign |
Constructor Summary | |
---|---|
WMFHeaderProperties()
Creates a new WMFHeaderProperties, with no associated file. |
|
WMFHeaderProperties(java.io.File wmffile)
Creates a new WMFHeaderProperties, and sets the associated WMF File. |
Method Summary | |
---|---|
void |
closeResource()
|
int |
getHeightBoundsPixels()
|
int |
getHeightBoundsUnits()
|
java.io.DataInputStream |
getStream()
Get the associated stream. |
int |
getWidthBoundsPixels()
|
int |
getWidthBoundsUnits()
|
int |
getXOffset()
|
int |
getYOffset()
|
protected boolean |
readRecords(java.io.DataInputStream is)
Read this InputStream records. |
void |
reset()
Resets the internal storage and viewport coordinates. |
void |
setFile(java.io.File wmffile)
Creates the properties associated file. |
Methods inherited from class org.apache.batik.transcoder.wmf.tosvg.AbstractWMFReader |
---|
addObject, addObjectAt, getBottomUnits, getHeightPixels, getHeightUnits, getLeftUnits, getMetaFileUnitsPerInch, getNumObjects, getObject, getPixelsPerUnit, getRectangleInch, getRectanglePixel, getRectangleUnits, getRightUnits, getTopUnits, getUnitsToPixels, getViewportHeightInch, getViewportHeightUnits, getViewportWidthInch, getViewportWidthUnits, getVpH, getVpHFactor, getVpW, getVpWFactor, getWidthPixels, getWidthUnits, getXSign, getYSign, isReading, read, readInt, readShort, setReading |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.DataInputStream stream
public static final int PEN
public static final int BRUSH
public static final int FONT
public static final int NULL_PEN
public static final int NULL_BRUSH
public static final int PALETTE
public static final int OBJ_BITMAP
public static final int OBJ_REGION
Constructor Detail |
---|
public WMFHeaderProperties(java.io.File wmffile) throws java.io.IOException
wmffile
- the WMF Metafile
java.io.IOException
public WMFHeaderProperties()
Method Detail |
---|
public void closeResource()
public void setFile(java.io.File wmffile) throws java.io.IOException
java.io.IOException
public void reset()
reset
in class AbstractWMFReader
public java.io.DataInputStream getStream()
protected boolean readRecords(java.io.DataInputStream is) throws java.io.IOException
AbstractWMFReader
AbstractWMFReader.read(DataInputStream)
). The behavior of this method is left
to the subclass.
Each Metafile record is composed of :
Example :
while (functionId > 0) { recSize = readInt( is ); // Subtract size in 16-bit words of recSize and functionId; recSize -= 3; functionId = readShort( is ); if ( functionId <= 0 ) break; switch ( functionId ) { case WMFConstants.<a WMF function ID> { do something when this function is encountered } break; default: for ( int j = 0; j < recSize; j++ ) readShort(is); break;
readRecords
in class AbstractWMFReader
java.io.IOException
WMFConstants
public int getWidthBoundsPixels()
public int getHeightBoundsPixels()
public int getWidthBoundsUnits()
public int getHeightBoundsUnits()
public int getXOffset()
public int getYOffset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |