Packages

 

com.aspose.imaging.fileformats.metafile

Class EmfMetafileImage

    • Method Detail

      • getBounds

        public Rectangle getBounds()
        Returns the metafile's bounds.
        Note: this rectangle is not an image size. To get image size and position use getMinX(), getMinY(), getWidth() and getHeight().
        Specified by:
        getBounds in interface IObjectWithBounds
        Specified by:
        getBounds in class MetafileImage
        Returns:
        metafile's bounds.
      • createRendering

        public RenderedImage createRendering(RenderContext rc)
        Creates RenderedImage from the metafile.
        Parameters:
        rc - RenderContext object used to create image.
      • wrap

        public static EmfMetafileImage wrap(byte[] imageData)
                                     throws MetafilesException
        Creates a new EmfMetafileImage containing specified raster image. Image will not be reencoded. Note: passing JPEG or PNG image to this function is possible, but not recomended because most of GDI drivers, including windows screen don't support JPEG and PNG images.
        Parameters:
        imageData - byte array containing image.
        Returns:
        created metafile.
        Throws:
        MetafilesException
      • createEmfRecorderGraphics

        public static EmfRecorderGraphics2D createEmfRecorderGraphics(Rectangle frame,
                                                                      Dimension deviceSize,
                                                                      float dpiX,
                                                                      float dpiY)
        Creates an EmfRecorderGraphics2D object to record an EMF metafile
        Parameters:
        frame - metafile's frame.
        deviceSize - metafile's reference device size
        dpiX - metafile's horizontal resolution.
        dpiY - metafile's vertical resolution.
        Returns:
        created EmfRecorderGraphics2D object
      • createEmfRecorderGraphics

        public static EmfRecorderGraphics2D createEmfRecorderGraphics(Rectangle frame,
                                                                      Dimension deviceSize,
                                                                      float dpiX,
                                                                      float dpiY,
                                                                      GraphicObjectConverter converter)
        Creates a EmfRecorderGraphics2D object to record a EMF metafile
        Parameters:
        frame - metafile's frame.
        deviceSize - metafile's reference device size
        dpiX - metafile's horizontal resolution.
        dpiY - metafile's vertical resolution.
        converter - callback object used to convert Paint, Stroke and Composite objects to the GDI objects.
        Returns:
        created EmfRecorderGraphics2D object
      • getWatermarkDrawer

        public com.aspose.imaging.fileformats.metafile.MetafileRecorderGraphics2D getWatermarkDrawer()

        Returns the custom watermark drawer

        Specified by:
        getWatermarkDrawer in class MetafileImage
        Returns:
        Graphics2D watermark drawer.
      • getMissedFonts

        public String[] getMissedFonts()
        Description copied from class: MetafileImage
        Returns the list of fonts which used inside metafile but not found.
        Specified by:
        getMissedFonts in class MetafileImage
        Returns:
        Font list