Package org.apache.batik.parser

Examples of org.apache.batik.parser.LengthParser


    public static float svgToObjectBoundingBox(String s,
                                               String attr,
                                               short d,
                                               Context ctx) {
        try {
            LengthParser lengthParser = new LengthParser();
            UnitResolver ur = new UnitResolver();
            lengthParser.setLengthHandler(ur);
            lengthParser.parse(new StringReader(s));
            return svgToObjectBoundingBox(ur.value, ur.unit, d, ctx);
        } catch (ParseException ex) {
            throw new BridgeException(ctx.getElement(),
                                   ErrorConstants.ERR_ATTRIBUTE_VALUE_MALFORMED,
                                      new Object[] {attr, s, ex});
View Full Code Here


    public static float svgToUserSpace(String s,
                                       String attr,
                                       short d,
                                       Context ctx) {
        try {
            LengthParser lengthParser = new LengthParser();
            UnitResolver ur = new UnitResolver();
            lengthParser.setLengthHandler(ur);
            lengthParser.parse(new StringReader(s));
            return svgToUserSpace(ur.value, ur.unit, d, ctx);
        } catch (ParseException ex) {
            throw new BridgeException(ctx.getElement(),
                                   ErrorConstants.ERR_ATTRIBUTE_VALUE_MALFORMED,
                                      new Object[] {attr, s, ex});
View Full Code Here

TOP

Related Classes of org.apache.batik.parser.LengthParser

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.