blob: 07c80063727b58832c781e4f33324ce233e10d09 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
org.apache.batik.transcoder.wmf.tosvg (Apache Batik Javadoc)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.apache.batik.transcoder.wmf.tosvg (Apache Batik Javadoc)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/batik/transcoder/wmf/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/batik/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/batik/transcoder/wmf/tosvg/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<H2>
Package org.apache.batik.transcoder.wmf.tosvg
</H2>
Contains all of the interfaces for transcoding WMF Metafiles to SVG.
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.html" title="class in org.apache.batik.transcoder.wmf.tosvg">AbstractWMFPainter</A></B></TD>
<TD>This class provides generic methods that must be used by a particular WMFPainter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.html" title="class in org.apache.batik.transcoder.wmf.tosvg">AbstractWMFReader</A></B></TD>
<TD>This class provides a general framework to read WMF Metafiles.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/GdiObject.html" title="class in org.apache.batik.transcoder.wmf.tosvg">GdiObject</A></B></TD>
<TD>Represents GDI Objects encountred in WMF Files.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/MetaRecord.html" title="class in org.apache.batik.transcoder.wmf.tosvg">MetaRecord</A></B></TD>
<TD>This is used to keep data while processing WMF-files.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/MetaRecord.ByteRecord.html" title="class in org.apache.batik.transcoder.wmf.tosvg">MetaRecord.ByteRecord</A></B></TD>
<TD>A record that contain byte arrays elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/MetaRecord.StringRecord.html" title="class in org.apache.batik.transcoder.wmf.tosvg">MetaRecord.StringRecord</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/RecordStore.html" title="class in org.apache.batik.transcoder.wmf.tosvg">RecordStore</A></B></TD>
<TD><B>Deprecated.</B>&nbsp;<I>jan '07 : this class is not used anywhere in Batik, it might be removed in the future.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/TextureFactory.html" title="class in org.apache.batik.transcoder.wmf.tosvg">TextureFactory</A></B></TD>
<TD>This class generate Paints from WMF hatch definitions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFFont.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFFont</A></B></TD>
<TD>Represent a WMF Font, encountered in a Metafile.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFHeaderProperties</A></B></TD>
<TD>This class holds simple properties about a WMF Metafile.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFPainter.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFPainter</A></B></TD>
<TD>Core class for rendering the WMF image.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFRecordStore.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFRecordStore</A></B></TD>
<TD>Reads a WMF file, including an Aldus Placable Metafile Header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFTranscoder.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFTranscoder</A></B></TD>
<TD>This class implements the <code>Transcoder</code> interface and
can convert a WMF input document into an SVG document.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFUtilities.html" title="class in org.apache.batik.transcoder.wmf.tosvg">WMFUtilities</A></B></TD>
<TD>This class holds various utilies for importing WMF files that can be used either for
<A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.html" title="class in org.apache.batik.transcoder.wmf.tosvg"><CODE>AbstractWMFReader</CODE></A>s and
<A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/AbstractWMFPainter.html" title="class in org.apache.batik.transcoder.wmf.tosvg"><CODE>AbstractWMFPainter</CODE></A>s</TD>
</TR>
</TABLE>
&nbsp;
<P>
<A NAME="package_description"><!-- --></A><H2>
Package org.apache.batik.transcoder.wmf.tosvg Description
</H2>
<P>
Contains all of the interfaces for transcoding WMF Metafiles to SVG. The
base class to perform the trasncoding is the
<A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFTranscoder.html" title="class in org.apache.batik.transcoder.wmf.tosvg"><CODE>WMFTranscoder</CODE></A> class. The
<A HREF="../../../../../../org/apache/batik/transcoder/wmf/tosvg/WMFHeaderProperties.html" title="class in org.apache.batik.transcoder.wmf.tosvg"><CODE>WMFHeaderProperties</CODE></A> class can be
used to get size informations from a WMF Metafile without converting it.
<h1>Examples</h1>
<ul>
<li>Simple transcoding : the dimensions of the SVG output will be the same
(in pixels) as the viewport dimensions of the Metafile</li>
<pre>
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);
</pre>
<li>Setting the dimensions to a particular width or height : the image
dimensions modification will be proportional</li>
<pre>
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);
</pre>
<li>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</li>
<pre>
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);
</pre>
</ul>
<P>
<P>
<DL>
</DL>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../../org/apache/batik/transcoder/wmf/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/batik/util/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/batik/transcoder/wmf/tosvg/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2017 <a href='http://www.apache.org/'>Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>