Package net.sourceforge.jeuclid

Examples of net.sourceforge.jeuclid.SAXMathBuilder


                in.mark(length + 1);
               
                TransformerFactory tFactory = TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                Source source = new StreamSource(in);
                SAXMathBuilder mathBuilder = new SAXMathBuilder();
                SAXResult res = new SAXResult(mathBuilder);
                transformer.transform(source, res);
               
                String fontname = "Helvetica";
                int fontstyle = 0;
                int displayfontsize = 12;
                int inlinefontsize = 12;

                if (mathBuilder.getMathRootElement() == null) {
                    //not a MathML document
                    try {
                        in.reset();
                    } catch (IOException ioe) {
                        log.error("Error while resetting ImageInputStream", ioe);
                    }
                    return null;
                }
                final MathBase base = new MathBase(
                                  mathBuilder.getMathRootElement(),
                                  fontname, fontstyle, inlinefontsize,
                                  displayfontsize);
               
                ImageInfo info = new ImageInfo(uri, "text/mathml");
                final ImageSize size = new ImageSize();
View Full Code Here

TOP

Related Classes of net.sourceforge.jeuclid.SAXMathBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.