public final class WmfMetafileImage extends MetafileImage
Constructor and Description |
---|
WmfMetafileImage(InputStream stream)
This constructor is the primary mechanism to read existing metafile from a stream.
|
WmfMetafileImage(String fileName)
This constructor is the primary mechanism to read existing presentation from a file.
|
Modifier and Type | Method and Description |
---|---|
void |
convertToNonplaceable()
Removes placeable header from metafile.
|
void |
convertToPlaceable(Rectangle frame,
short mupi)
Adds placeable header to the metafile.
|
RenderedImage |
createRendering(RenderContext rc)
Creates RenderedImage from the metafile.
|
static WmfRecorderGraphics2D |
createWmfRecorderGraphics(Rectangle frame,
int dpi)
Creates a WmfRecorderGraphics2D object to record a WMF metafile
|
static WmfRecorderGraphics2D |
createWmfRecorderGraphics(Rectangle frame,
int dpi,
Charset charset,
GraphicObjectConverter converter)
Creates a WmfRecorderGraphics2D object to record a WMF metafile
|
Rectangle |
getBounds()
Returns metafile's bounds.
Note: this rectangle is not an image size. |
com.aspose.imaging.fileformats.metafile.MetafileComment[] |
getComments()
Returns comments stored in a metafile.
|
float |
getDpi()
Returns metafile's DPI.
|
List<EmfMetafileImage> |
getEmbeddedMetafiles()
Returns EMF images embedded into the WMF file.
|
String[] |
getMissedFonts()
Retu rns the list of fonts which used inside metafile and are not found in system.
|
Rectangle |
getMuFrame()
Returns metafile's position and size in internal metafile units.
|
float |
getMupi()
Returns number of metafile's units per inch.
|
String[] |
getUsedFonts()
Returns the list of font which used inside metafile.
|
com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D |
getWatermarkDrawer()
Returns the custom watermark drawer
|
boolean |
isPlaceable()
Returns true if WMF metafile has placeable header.
|
void |
playMetafile(Graphics2D target)
Draws a metafile without transform to the specified Graphics2D object.
|
void |
playMetafile(Graphics2D target,
AffineTransform trans)
Draws a metafile to the specified Graphics2D object with transformation.
|
void |
setDeviceSize(Dimension deviceSize)
Changes device size for nonplaceable metafiles.
|
void |
setDpi(float dpi)
Changes device (both horizontal and vertical) for nonplaceable metafiles.
|
void |
setVerticalDpi(float dpi)
Changes device vertical for nonplaceable metafiles.
|
static WmfMetafileImage |
wrap(BufferedImage image)
Creates a new WmfMetafileImage containing specified raster image.
|
static WmfMetafileImage |
wrap(byte[] imageData)
Creates a new WmfMetafileImage containing specified raster image.
|
cacheData, clone, createDefaultRendering, createScaledRendering, crop, crop, getBitsPerPixel, getCroppingRectangle, getDefaultRenderingHints, getEmbeddedBitmaps, getHeight, getMaxPixelCount, getMinPixelCount, getMinX, getMinY, getProperty, getPropertyNames, getRenderableBackgroundColor, getSources, getTextOutOperations, getTextStrings, getWidth, isCached, isDynamic, resize, resize, rotateFlip, save_internalized, setDefaultRenderingHints, setMaxPixelCount, setMinPixelCount, setPalette, setRenderableBackgroundColor
canLoad, canLoad, canLoad, canLoad, canLoadInternal_internalized, canLoadInternal_internalized, canSave, create, getBackgroundColor, getContainer, getFileFormat, getFileFormat, getFileFormatInternal_internalized, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, getVentureLicense_internalized, hasBackgroundColor, load, load, load, load, loadInternal_internalized, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save_internalized, save, save, save, save, save, setBackgroundColor, setBackgroundColor, setContainer_internalized, setPalette, setVentureLicense_internalized
getDataStreamContainer, save, save, save, setDataStreamContainer
close, dispose, getDisposed
public WmfMetafileImage(InputStream stream) throws MetafilesException
stream
- -
the input stream.MetafilesException
public WmfMetafileImage(String fileName) throws MetafilesException, FileNotFoundException
fileName
- -
name of a file.MetafilesException
FileNotFoundException
public static WmfRecorderGraphics2D createWmfRecorderGraphics(Rectangle frame, int dpi)
frame
- metafile's frame.dpi
- metafile's resolutionpublic static WmfRecorderGraphics2D createWmfRecorderGraphics(Rectangle frame, int dpi, Charset charset, GraphicObjectConverter converter)
frame
- metafile's frame.dpi
- metafile's resolutionconverter
- callback object used to convert Paint, Stroke and Composite objects to the GDI objects.public void setDeviceSize(Dimension deviceSize)
deviceSize
- - new device sizepublic void setDpi(float dpi)
dpi
- - new dpi.public void setVerticalDpi(float dpi)
dpi
- - new vertical dpi.public void convertToNonplaceable()
public void convertToPlaceable(Rectangle frame, short mupi)
frame
- - metafile's frame in metafile's units.mupi
- - number of metafile's units per inch.public boolean isPlaceable()
public Rectangle getBounds()
getBounds
in interface IObjectWithBounds
getBounds
in class MetafileImage
public Rectangle getMuFrame()
public float getDpi()
public float getMupi()
public List<EmfMetafileImage> getEmbeddedMetafiles()
public void playMetafile(Graphics2D target) throws MetafilesException
playMetafile
in class MetafileImage
target
- -
Graphics2D object.MetafilesException
public void playMetafile(Graphics2D target, AffineTransform trans) throws MetafilesException
playMetafile
in class MetafileImage
target
- -
Graphics2D object.trans
- -
coordinates transformation from metafile's coordinates to Graphics2D user
space.MetafilesException
public RenderedImage createRendering(RenderContext rc)
rc
- -
RenderContext object used to create image.public static WmfMetafileImage wrap(BufferedImage image) throws MetafilesException
image
- - image to wrap with metafile.MetafilesException
public static WmfMetafileImage wrap(byte[] imageData) throws MetafilesException
imageData
- - byte array containing image.MetafilesException
public com.aspose.imaging.fileformats.metafile.MetafileComment[] getComments()
getComments
in class MetafileImage
public com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D getWatermarkDrawer()
Returns the custom watermark drawer
getWatermarkDrawer
in class MetafileImage
Graphics2D
watermark drawer.public String[] getUsedFonts()
MetafileImage
getUsedFonts
in class MetafileImage
public String[] getMissedFonts()
MetafileImage
getMissedFonts
in class MetafileImage
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.