Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.fx   Previous This
Package
Next

 


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.

Constructors

FxGraphicMetaFile

public FxGraphicMetaFile();

Creates an uninitialized FxGraphicMetaFile object.

Remarks:

Currently, this constructor is not implemented.

FxGraphicMetaFile

public FxGraphicMetaFile(InputStream is) throws FileNotFoundException;

Creates a playable metafile from an InputStream.

ParameterDescription
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.

FxGraphicMetaFile

public FxGraphicMetaFile(String filename) throws FileNotFoundException;

Creates a playable metafile.

ParameterDescription
filename A name for the metafile that you create.

Exceptions:

FileNotFoundException if the filename is not valid.

Methods

enumerate

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

play

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.

ParameterDescription
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.

play

public void play(Component comp);

Plays the metafile on the given component.

Return Value:

No return value.

ParameterDescription
comp The component to use with the metafile.

play

public void play(Image img);

Plays the metafile on the given Image object.

Return Value:

No return value.

ParameterDescription
img The image to use with the metafile.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.