public final class EmfMetafileImage extends MetafileImage
Constructor and Description |
---|
EmfMetafileImage(InputStream stream)
This constructor is the primary mechanism to read existing metafile from a stream.
|
EmfMetafileImage(String fileName)
This constructor is the primary mechanism to read existing metafile from a file.
|
Modifier and Type | Method and Description |
---|---|
static EmfRecorderGraphics2D |
createEmfRecorderGraphics(Rectangle frame,
Dimension deviceSize,
float dpiX,
float dpiY)
Creates an EmfRecorderGraphics2D object to record an EMF metafile
|
static EmfRecorderGraphics2D |
createEmfRecorderGraphics(Rectangle frame,
Dimension deviceSize,
float dpiX,
float dpiY,
GraphicObjectConverter converter)
Creates a EmfRecorderGraphics2D object to record a EMF metafile
|
RenderedImage |
createRendering(RenderContext rc)
Creates RenderedImage from the metafile.
|
Rectangle |
getBounds()
Returns the metafile's bounds.
Note: this rectangle is not an image size. |
com.aspose.imaging.fileformats.metafile.MetafileComment[] |
getComments()
Returns comments stored in a metafile.
|
String[] |
getMissedFonts()
Retu rns the list of fonts which used inside metafile and are not found in system.
|
String[] |
getUsedFonts()
Returns the list of font which used inside metafile.
|
com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D |
getWatermarkDrawer()
Returns the custom watermark drawer
|
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.
|
static EmfMetafileImage |
wrap(BufferedImage image)
Creates a new EmfMetafileImage containing specified raster image.
|
static EmfMetafileImage |
wrap(byte[] imageData)
Creates a new EmfMetafileImage 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 EmfMetafileImage(InputStream stream) throws MetafilesException
stream
- input stream.MetafilesException
public EmfMetafileImage(String fileName) throws MetafilesException, FileNotFoundException
fileName
- name of a file.MetafilesException
FileNotFoundException
public Rectangle getBounds()
getBounds
in interface IObjectWithBounds
getBounds
in class MetafileImage
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 EmfMetafileImage wrap(BufferedImage image) throws MetafilesException
image
- image to wrap with metafile.MetafilesException
public static EmfMetafileImage wrap(byte[] imageData) throws MetafilesException
imageData
- byte array containing image.MetafilesException
public static EmfRecorderGraphics2D createEmfRecorderGraphics(Rectangle frame, Dimension deviceSize, float dpiX, float dpiY)
frame
- metafile's frame.deviceSize
- metafile's reference device sizedpiX
- metafile's horizontal resolution.dpiY
- metafile's vertical resolution.public static EmfRecorderGraphics2D createEmfRecorderGraphics(Rectangle frame, Dimension deviceSize, float dpiX, float dpiY, GraphicObjectConverter converter)
frame
- metafile's frame.deviceSize
- metafile's reference device sizedpiX
- metafile's horizontal resolution.dpiY
- metafile's vertical resolution.converter
- callback object used to convert Paint, Stroke and Composite objects to the GDI objects.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.