org.apache.batik.transcoder.wmf.tosvg

Class WMFHeaderProperties

public class WMFHeaderProperties extends AbstractWMFReader

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 intBRUSH
static intFONT
static intNULL_BRUSH
static intNULL_PEN
static intOBJ_BITMAP
static intOBJ_REGION
static intPALETTE
static intPEN
protected DataInputStreamstream
Constructor Summary
WMFHeaderProperties(File wmffile)
Creates a new WMFHeaderProperties, and sets the associated WMF File.
WMFHeaderProperties()
Creates a new WMFHeaderProperties, with no associated file.
Method Summary
voidcloseResource()
intgetHeightBoundsPixels()
intgetHeightBoundsUnits()
DataInputStreamgetStream()
Get the associated stream.
intgetWidthBoundsPixels()
intgetWidthBoundsUnits()
intgetXOffset()
intgetYOffset()
protected booleanreadRecords(DataInputStream is)
voidreset()
Resets the internal storage and viewport coordinates.
voidsetFile(File wmffile)
Creates the properties associated file.

Field Detail

BRUSH

public static final int BRUSH

FONT

public static final int FONT

NULL_BRUSH

public static final int NULL_BRUSH

NULL_PEN

public static final int NULL_PEN

OBJ_BITMAP

public static final int OBJ_BITMAP

OBJ_REGION

public static final int OBJ_REGION

PALETTE

public static final int PALETTE

PEN

public static final int PEN

stream

protected DataInputStream stream

Constructor Detail

WMFHeaderProperties

public WMFHeaderProperties(File wmffile)
Creates a new WMFHeaderProperties, and sets the associated WMF File.

Parameters: wmffile the WMF Metafile

WMFHeaderProperties

public WMFHeaderProperties()
Creates a new WMFHeaderProperties, with no associated file.

Method Detail

closeResource

public void closeResource()

getHeightBoundsPixels

public int getHeightBoundsPixels()

Returns: the height of the Rectangle bounding the figures enclosed in the Metafile, in pixels.

getHeightBoundsUnits

public int getHeightBoundsUnits()

Returns: the height of the Rectangle bounding the figures enclosed in the Metafile in Metafile Units.

getStream

public DataInputStream getStream()
Get the associated stream.

getWidthBoundsPixels

public int getWidthBoundsPixels()

Returns: the width of the Rectangle bounding the figures enclosed in the Metafile, in pixels

getWidthBoundsUnits

public int getWidthBoundsUnits()

Returns: the width of the Rectangle bounding the figures enclosed in the Metafile, in Metafile Units.

getXOffset

public int getXOffset()

Returns: the X offset of the Rectangle bounding the figures enclosed in the Metafile.

getYOffset

public int getYOffset()

Returns: the Y offset of the Rectangle bounding the figures enclosed in the Metafile.

readRecords

protected boolean readRecords(DataInputStream is)

reset

public void reset()
Resets the internal storage and viewport coordinates.

setFile

public void setFile(File wmffile)
Creates the properties associated file.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.