public AffineTransform(AffineTransform t)
 {
     this.type = t.type;
     this.m00 = t.m00;
     this.m10 = t.m10;
     this.m01 = t.m01;
     this.m11 = t.m11;
     this.m02 = t.m02;
     this.m12 = t.m12;
 }
 /**
  * Multiply matrix of two AffineTransform objects
  * @param t1 - the AffineTransform object is a multiplicand
  * @param t2 - the AffineTransform object is a multiplier
  * @return an AffineTransform object that is a result of t1 multiplied by matrix t2.
  */
 AffineTransform multiply(AffineTransform t1, AffineTransform t2)
 {
     return new AffineTransform(
             t1.m00 * t2.m00 + t1.m10 * t2.m01,          // m00
             t1.m00 * t2.m10 + t1.m10 * t2.m11,          // m01
             t1.m01 * t2.m00 + t1.m11 * t2.m01,          // m10
             t1.m01 * t2.m10 + t1.m11 * t2.m11,          // m11
             t1.m02 * t2.m00 + t1.m12 * t2.m01 + t2.m02, // m02
             t1.m02 * t2.m10 + t1.m12 * t2.m11 + t2.m12);// m12
 }
 public void setTransform(AffineTransform t)
 {
     type = t.type;
     setTransform(t.m00, t.m10, t.m01, t.m11, t.m02, t.m12);
 }
 public void preConcatenate(AffineTransform t)
 {
     setTransform(multiply(this, t));
 }
 public void concatenate(AffineTransform t)
 {
     setTransform(multiply(t, this));
 }
 public static AffineTransform getTranslateInstance(double mx, double my)
 {
     AffineTransform t = new AffineTransform();
     t.setToTranslation(mx, my);
     return t;
 }
 /**
  * Constructs a new Line2D.Iterator for given line and transformation
  * @param l - the source Line2D object
  * @param at - the AffineTransform object to apply rectangle path
  */
 internal Iterator(Line2D l, AffineTransform at)
 {
     this.x1 = l.getX1();
     this.y1 = l.getY1();
     this.x2 = l.getX2();
     this.y2 = l.getY2();
     this.t = at;
 }
 public PathIterator getPathIterator(AffineTransform t, double flatness)
 {
     return new FlatteningPathIterator(getPathIterator(t), flatness);
 }
 public static AffineTransform getRotateInstance(double angle, double x, double y)
 {
     AffineTransform t = new AffineTransform();
     t.setToRotation(angle, x, y);
     return t;
 }
 /**
  * Constructs a new GeneralPath.Iterator for given general path and transformation
  * @param path - the source GeneralPath object
  * @param at - the AffineTransform object to apply rectangle path
  */
 internal Iterator(GeneralPath path, AffineTransform at)
 {
     this.p = path;
     this.t = at;
 }
 public void transform(AffineTransform t)
 {
     t.transform(points, 0, points, 0, pointSize / 2);
 }
 public Shape createTransformedShape(AffineTransform t)
 {
     GeneralPath p = (GeneralPath)clone();
     if (t != null) {
     p.transform(t);
     }
     return p;
 }
 /**
  * Constructs a new CubicCurve2D.Iterator for given line and transformation
  * @param c - the source CubicCurve2D object
  * @param at - the AffineTransform object to apply rectangle path
  */
 internal Iterator(CubicCurve2D c, AffineTransform t)
 {
     this.c = c;
     this.t = t;
 }
 /**
  * Constructs a new Rectangle2D.Iterator for given rectangle and transformation
  * @param r - the source Rectangle2D object
  * @param at - the AffineTransform object to apply rectangle path
  */
 internal Iterator(Rectangle2D r, AffineTransform at)
 {
     this.x = r.getX();
     this.y = r.getY();
     this.width = r.getWidth();
     this.height = r.getHeight();
     this.t = at;
     if (width < 0.0 || height < 0.0)
     {
         index = 6;
     }
 }
 public override PathIterator getPathIterator(AffineTransform t, double flatness)
 {
     return new Iterator(this, t);
 }
 public static AffineTransform getScaleInstance(double scx, double scY)
 {
     AffineTransform t = new AffineTransform();
     t.setToScale(scx, scY);
     return t;
 }
 public PathIterator getPathIterator(AffineTransform t)
 {
     return new Iterator(this, t);
 }
 public static AffineTransform getShearInstance(double shx, double shy)
 {
     AffineTransform m = new AffineTransform();
     m.setToShear(shx, shy);
     return m;
 }
 /**
  * Constructs a new QuadCurve2D.Iterator for given line and transformation
  * @param q - the source QuadCurve2D object
  * @param at - the AffineTransform object to apply rectangle path
  */
 internal Iterator(QuadCurve2D q, AffineTransform t)
 {
     this.c = q;
     this.t = t;
 }
Example #20
0
 public PathIterator getPathIterator(AffineTransform at, double flatness)
 {
     return new Iterator(this, at);
 }