Package net.sf.latexdraw.parsers.svg

Examples of net.sf.latexdraw.parsers.svg.SVGTransformList.transformPoint()


    Point2D pt1 = new Point2D.Double(1,1);
    Point2D pt2 = new Point2D.Double(3,4);
    Point2D pt3;

    t.addTransformations("translate( 2 3)"); //$NON-NLS-1$
    assertEquals(t.transformPoint(pt1), pt2);

    t.addTransformations("translate( -2 -3)"); //$NON-NLS-1$
    t.addTransformations("rotate(90)"); //$NON-NLS-1$
    pt2.setLocation(0, 1);
    pt1.setLocation(1, 0);
View Full Code Here


    t.addTransformations("translate( -2 -3)"); //$NON-NLS-1$
    t.addTransformations("rotate(90)"); //$NON-NLS-1$
    pt2.setLocation(0, 1);
    pt1.setLocation(1, 0);

    pt3 = t.transformPoint(pt1);
    assertEquals(Math.rint(pt3.getX()), pt2.getX(), 0.0001);
    assertEquals(Math.rint(pt3.getY()), pt2.getY(), 0.0001);
  }

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.