Examples of parseLength()


Examples of net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser.parseLength()

    assertEquals(l.getValueAsString(), "-10.65"); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65, SVGLength.LengthType.PC), l.getValue(), 0.001);

    p = new SVGLengthParser("\t -10.65e2  \t \n px \t   "); //$NON-NLS-1$
    l = p.parseLength();

    assertEquals(l.getValueAsString(), "-10.65e2"); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue(), 0.001);
View Full Code Here

Examples of net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser.parseLength()

    assertEquals(l.getValueAsString(), "-10.65e2"); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e2, SVGLength.LengthType.PX), l.getValue(), 0.001);

    p = new SVGLengthParser("\t -10.65e0pt \t   "); //$NON-NLS-1$
    l = p.parseLength();

    assertEquals(l.getValueAsString(), "-10.65e0"); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue(), 0.001);
View Full Code Here

Examples of net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser.parseLength()

    assertEquals(l.getValueAsString(), "-10.65e0"); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-10.65e0, SVGLength.LengthType.PT), l.getValue(), 0.001);

    p = new SVGLengthParser("\t -1.in \t   "); //$NON-NLS-1$
    l = p.parseLength();

    assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue(), 0.001);
View Full Code Here

Examples of net.sf.latexdraw.parsers.svg.parsers.SVGLengthParser.parseLength()

    assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.IN), l.getValue(), 0.001);

    p = new SVGLengthParser("-1."); //$NON-NLS-1$
    l = p.parseLength();

    assertEquals(l.getValueAsString(), "-1."); //$NON-NLS-1$
    assertEquals(l.getLengthType(), SVGLength.LengthType.PX);
    assertEquals(UnitProcessor.INSTANCE.toUserUnit(-1., SVGLength.LengthType.NUMBER), l.getValue(), 0.001);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.