Package io.sf.carte.echosvg.transcoder.wmf.tosvg
package io.sf.carte.echosvg.transcoder.wmf.tosvg
Contains all of the interfaces for transcoding WMF Metafiles to SVG. The
base class to perform the trasncoding is the
Setting the dimensions to a particular width or height : the image
dimensions modification will be proportional
Getting only the bounds of the figures in the Metafile : the SVG viewbox
will be defined by the bounds of the figures in the Metafile, regardless of its viewport
WMFTranscoder
class. The
WMFHeaderProperties
class can be
used to get size informations from a WMF Metafile without converting it.
Examples
- Simple transcoding : the dimensions of the SVG output will be the same (in pixels) as the viewport dimensions of the Metafile
TranscoderInput input = new TranscoderInput(inputFile.toURI().toString()); OutputStream stream = new FileOutputStream(outputFile); TranscoderOutput output = new TranscoderOutput(stream); WMFTranscoder transcoder = new WMFTranscoder(); transcoder.transcode(input,output);
TranscoderInput input = new TranscoderInput(inputFile.toURI().toString()); OutputStream stream = new FileOutputStream(outputFile); TranscoderOutput output = new TranscoderOutput(stream); WMFTranscoder transcoder = new WMFTranscoder(); transcoder.addTranscodingHint(WMFTranscoder.KEY_WIDTH, new Float(outputWidth)); transcoder.transcode(input,output);
WMFHeaderProperties prop = new WMFHeaderProperties(inputFile); TranscoderInput input = new TranscoderInput(inputFile.toURI().toString()); OutputStream stream = new FileOutputStream(outputFile); TranscoderOutput output = new TranscoderOutput(stream); WMFTranscoder transcoder = new WMFTranscoder(); transcoder.addTranscodingHint(WMFTranscoder.KEY_INPUT_WIDTH, new Integer(prop.getWidthBoundsPixels())); transcoder.addTranscodingHint(WMFTranscoder.KEY_INPUT_HEIGHT, new Integer(prop.getHeightBoundsPixels())); transcoder.addTranscodingHint(WMFTranscoder.KEY_XOFFSET, new Integer(prop.getXOffset())); transcoder.addTranscodingHint(WMFTranscoder.KEY_YOFFSET, new Integer(prop.getYOffset())); transcoder.transcode(input,output);
-
ClassDescriptionThis class provides generic methods that must be used by a particular WMFPainter.This class provides a general framework to read WMF Metafiles.Represents GDI Objects encountred in WMF Files.This is used to keep data while processing WMF-files.A record that contain byte arrays elements.Deprecated.jan '07 : this class is not used anywhere in EchoSVG, it might be removed in the future.This class generate Paints from WMF hatch definitions.Represent a WMF Font, encountered in a Metafile.This class holds simple properties about a WMF Metafile.Core class for rendering the WMF image.Reads a WMF file, including an Aldus Placable Metafile Header.This class implements the
Transcoder
interface and can convert a WMF input document into an SVG document.This class holds various utilies for importing WMF files that can be used either forAbstractWMFReader
s andAbstractWMFPainter
s