Class FxGraphicMetaFile
public class FxGraphicMetaFile
{
// Constructors
public FxGraphicMetaFile();
public FxGraphicMetaFile(InputStream is)
throws FileNotFoundException;
public FxGraphicMetaFile(String filename)
throws FileNotFoundException;
// Methods
public void enumerate() throws AWTException;
public void play(Graphics g, int x, int y, int w, int h);
public void play(Component comp);
public void play(Image img);
}
This class plays Microsoft® Windows® metafiles.
public FxGraphicMetaFile();
Creates an uninitialized FxGraphicMetaFile object.
Remarks:
Currently, this constructor is not implemented.
public FxGraphicMetaFile(InputStream is) throws FileNotFoundException;
Creates a playable metafile from an InputStream.
Parameter | Description |
is
| An InputStream used to create the metafile.
|
Exceptions:
FileNotFoundException
if a FileInputStream object is passed and the specified filename is not valid or cannot be found.
public FxGraphicMetaFile(String filename) throws FileNotFoundException;
Creates a playable metafile.
Parameter | Description |
filename
| A name for the metafile that you create.
|
Exceptions:
FileNotFoundException
if the filename is not valid.
public void enumerate() throws AWTException;
Enumerates all records in the metafile, which loads up the vectors used in playback.
Note the following records are not supported by the FxGraphicMetaFile class.
META_SETPIXEL
|
META_ROUNDRECT
|
META_FLOODFILL
|
META_PATBLT
|
META_BITBLT
|
META_STRETCHBLT
|
META_POLYPOLYGON
|
META_SETDIBTODEV
|
META_SETSTRETCHBLTMODE
|
META_STRETCHDIB
|
META_DIBBITBLT
|
META_CREATEBITMAPINDIRECT
|
META_DIBSTRETCHBLT
|
META_EXTFLOODFILL
|
META_CREATEBITMAP
|
Return Value:
No return value.
Exceptions:
AWTException
public void play(Graphics g, int x, int y, int w, int h);
Plays the metafile on the given graphics object.
Return Value:
No return value.
Parameter | Description |
g
| The graphics object to use with the metafile.
|
x
| The upper-left x coordinate of the graphics object.
|
y
| The upper-left y coordinate of the graphics object.
|
w
| The width of the graphics (in pixels).
|
h
| The height of the graphics (in pixels).
|
Exceptions:
FileNotFoundException
if the filename is not valid, or the file cannot be found.
public void play(Component comp);
Plays the metafile on the given component.
Return Value:
No return value.
Parameter | Description |
comp
| The component to use with the metafile.
|
public void play(Image img);
Plays the metafile on the given Image object.
Return Value:
No return value.
Parameter | Description |
img
| The image to use with the metafile.
|