org.apache.batik.transcoder.wmf.tosvg

Class RecordStore

public class RecordStore extends Object

Deprecated: jan '07 : this class is not used anywhere in Batik, it might be removed in the future. Probably WMFRecordStore is what you need.

An object that stores the vector graphics records.
Field Summary
protected booleanbReading
intlastObjectIdx
protected intnumObjects
protected intnumRecords
protected VectorobjectVector
protected Vectorrecords
protected intvpH
protected intvpW
protected intvpX
protected intvpY
Constructor Summary
RecordStore()
Method Summary
voidaddObject(int type, Object obj)
Adds a GdiObject to the internal handle table.
voidaddObjectAt(int type, Object obj, int idx)
Adds a GdiObject to the internal handle table.
intgetNumObjects()
Returns the number of GdiObjects in the handle table
intgetNumRecords()
Returns a number of records in the image
GdiObjectgetObject(int idx)
Returns a GdiObject from the handle table
MetaRecordgetRecord(int idx)
Returns a meta record.
URLgetUrl()
Returns the current URL
intgetVpH()
Returns the viewport height
intgetVpW()
Returns the viewport width
intgetVpX()
Returns the viewport x origin
intgetVpY()
Returns the viewport y origin
booleanread(DataInputStream is)
Reads the Wmf file from the specified Stream.
voidreset()
Resets the internal storage and viewport coordinates.
voidsetUrl(URL newUrl)
Sets the current URL
voidsetVpH(int newValue)
Sets the viewport height
voidsetVpW(int newValue)
Sets the viewport width
voidsetVpX(int newValue)
Sets the viewport x origin
voidsetVpY(int newValue)
Sets the viewport y origin

Field Detail

bReading

protected transient boolean bReading

lastObjectIdx

public transient int lastObjectIdx

numObjects

protected transient int numObjects

numRecords

protected transient int numRecords

objectVector

protected transient Vector objectVector

records

protected transient Vector records

vpH

protected transient int vpH

vpW

protected transient int vpW

vpX

protected transient int vpX

vpY

protected transient int vpY

Constructor Detail

RecordStore

public RecordStore()

Method Detail

addObject

public void addObject(int type, Object obj)
Adds a GdiObject to the internal handle table. Adds the object at the next free location. This function should not normally be called by an application.

addObjectAt

public void addObjectAt(int type, Object obj, int idx)
Adds a GdiObject to the internal handle table. Wmf files specify the index as given in EMF records such as EMRCREATEPENINDIRECT whereas WMF files always use 0. This function should not normally be called by an application.

getNumObjects

public int getNumObjects()
Returns the number of GdiObjects in the handle table

getNumRecords

public int getNumRecords()
Returns a number of records in the image

getObject

public GdiObject getObject(int idx)
Returns a GdiObject from the handle table

getRecord

public MetaRecord getRecord(int idx)
Returns a meta record.

getUrl

public URL getUrl()
Returns the current URL

getVpH

public int getVpH()
Returns the viewport height

getVpW

public int getVpW()
Returns the viewport width

getVpX

public int getVpX()
Returns the viewport x origin

getVpY

public int getVpY()
Returns the viewport y origin

read

public boolean read(DataInputStream is)
Reads the Wmf file from the specified Stream. A Wmf file can be produced using the GConvert utility found at http://www.asd.ie/Wmf.htm The Wmf format is slightly more compact than the original WMF format and in some cases may produce better handling of colours.

reset

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

setUrl

public void setUrl(URL newUrl)
Sets the current URL

setVpH

public void setVpH(int newValue)
Sets the viewport height

setVpW

public void setVpW(int newValue)
Sets the viewport width

setVpX

public void setVpX(int newValue)
Sets the viewport x origin

setVpY

public void setVpY(int newValue)
Sets the viewport y origin
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.