|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.pixie.wmf.WmfFile
public class WmfFile
Parses and replays the WmfFile.
Field Summary | |
---|---|
static int |
QUALITY_MAYBE
|
static int |
QUALITY_NO
|
static int |
QUALITY_YES
|
Constructor Summary | |
---|---|
WmfFile(java.io.InputStream in,
int imageX,
int imageY)
Initialize metafile for reading from filename. |
|
WmfFile(java.lang.String input)
|
|
WmfFile(java.lang.String inName,
int imageX,
int imageY)
Initialize metafile for reading from filename. |
|
WmfFile(java.net.URL input)
|
|
WmfFile(java.net.URL input,
int imageX,
int imageY)
|
Method Summary | |
---|---|
void |
assertValid()
Check class invariant. |
void |
deleteObject(int slot)
|
void |
draw(java.awt.Graphics2D graphics,
java.awt.geom.Rectangle2D bounds)
|
protected int |
findFreeSlot()
Return the next free slot from the objects table. |
MfLogBrush |
getBrushObject(int slot)
|
MfDcState |
getCurrentState()
|
java.awt.Graphics2D |
getGraphics2D()
|
MfHeader |
getHeader()
Return Placeable and Windows headers that were read earlier. |
java.awt.Dimension |
getImageSize()
|
WmfObject |
getObject(int slot)
|
MfPalette |
getPalette()
|
MfLogPen |
getPenObject(int slot)
|
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of the drawable. |
MfLogRegion |
getRegionObject(int slot)
|
int |
getStateCount()
|
static int |
isMetafile(java.lang.String inName,
java.io.InputStream in)
Return true if the input is a metafile |
boolean |
isPreserveAspectRatio()
Returns true, if this drawable will preserve an aspect ratio during the drawing. |
static void |
main(java.lang.String[] args)
|
protected void |
parseRecords()
Read and interpret the body of the metafile. |
MfHeader |
readHeader()
Read Placeable and Windows headers. |
MfRecord |
readNextRecord()
Fetch a record. |
java.awt.image.BufferedImage |
replay()
|
java.awt.image.BufferedImage |
replay(int imageX,
int imageY)
|
void |
resetStates()
|
void |
restoreDCState(int stateCount)
Restores a state. |
void |
saveDCState()
|
void |
scalePercent(float percent)
Scale the image to a certain percentage. |
void |
scalePercent(float percentX,
float percentY)
Scale the width and height of an image to a certain percentage. |
void |
scaleToFit(float fitWidth,
float fitHeight)
|
void |
storeObject(WmfObject o)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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 WmfFile(java.net.URL input) throws java.io.IOException
java.io.IOException
public WmfFile(java.lang.String input) throws java.io.IOException
java.io.IOException
public WmfFile(java.net.URL input, int imageX, int imageY) throws java.io.IOException
java.io.IOException
public WmfFile(java.lang.String inName, int imageX, int imageY) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public WmfFile(java.io.InputStream in, int imageX, int imageY) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
Method Detail |
---|
public java.awt.Dimension getImageSize()
public void resetStates()
public MfPalette getPalette()
public static int isMetafile(java.lang.String inName, java.io.InputStream in)
public MfHeader getHeader()
public java.awt.Graphics2D getGraphics2D()
public void assertValid()
public MfHeader readHeader() throws java.io.IOException
java.io.IOException
public MfRecord readNextRecord() throws java.io.IOException
java.io.IOException
protected void parseRecords() throws java.io.IOException
java.io.IOException
public void scaleToFit(float fitWidth, float fitHeight)
public void scalePercent(float percent)
percent
- the scaling percentage public void scalePercent(float percentX, float percentY)
percentX
- the scaling percentage of the widthpercentY
- the scaling percentage of the height public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public MfDcState getCurrentState()
public void saveDCState()
public int getStateCount()
public void restoreDCState(int stateCount)
stateCount
- the state count.protected int findFreeSlot()
public void storeObject(WmfObject o)
public void deleteObject(int slot)
public WmfObject getObject(int slot)
public MfLogBrush getBrushObject(int slot)
public MfLogPen getPenObject(int slot)
public MfLogRegion getRegionObject(int slot)
public java.awt.image.BufferedImage replay()
public java.awt.image.BufferedImage replay(int imageX, int imageY)
public void draw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)
draw
in interface org.jfree.ui.Drawable
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface org.jfree.ui.ExtendedDrawable
public boolean isPreserveAspectRatio()
isPreserveAspectRatio
in interface org.jfree.ui.ExtendedDrawable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |