@Override public Rectangle2D createIntersection(Rectangle2D r) { Rectangle2D dst; if (r instanceof Double) { dst = new Rectangle2D.Double(); } else { dst = new Rectangle2D.Float(); } Rectangle2D.intersect(this, r, dst); return dst; }
@Override public Rectangle2D createUnion(Rectangle2D r) { if (r instanceof Rectangle) { return union((Rectangle)r); } Rectangle2D dst = new Rectangle2D.Double(); Rectangle2D.union(this, r, dst); return dst; }
public Shape createTransformedShape(Shape src) { if (src == null) { return null; } if (src instanceof GeneralPath) { return ((GeneralPath)src).createTransformedShape(this); } PathIterator path = src.getPathIterator(this); GeneralPath dst = new GeneralPath(path.getWindingRule()); dst.append(path, false); return dst; }
public Point2D deltaTransform(Point2D src, Point2D dst) { if (dst == null) { if (src instanceof Point2D.Double) { dst = new Point2D.Double(); } else { dst = new Point2D.Float(); } } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01, x * m10 + y * m11); return dst; }
public GeneralPath(Shape shape) { this(WIND_NON_ZERO, BUFFER_SIZE); PathIterator p = shape.getPathIterator(null); setWindingRule(p.getWindingRule()); append(p, false); }
@Override public Rectangle2D createUnion(Rectangle2D r) { Rectangle2D dst; if (r instanceof Double) { dst = new Rectangle2D.Double(); } else { dst = new Rectangle2D.Float(); } Rectangle2D.union(this, r, dst); return dst; }
@Override public Rectangle2D createIntersection(Rectangle2D r) { if (r instanceof Rectangle) { return intersection((Rectangle) r); } Rectangle2D dst = new Rectangle2D.Double(); Rectangle2D.intersect(this, r, dst); return dst; }
public Point2D transform(Point2D src, Point2D dst) { if (dst == null) { if (src instanceof Point2D.Double) { dst = new Point2D.Double(); } else { dst = new Point2D.Float(); } } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; }
public Shape createTransformedShape(Shape src) { if (src == null) { return null; } if (src instanceof GeneralPath) { return ((GeneralPath)src).createTransformedShape(this); } PathIterator path = src.getPathIterator(this); GeneralPath dst = new GeneralPath(path.getWindingRule()); dst.append(path, false); return dst; }
@Override public Rectangle2D createIntersection(Rectangle2D r) { Rectangle2D dst; if (r instanceof Double) { dst = new Rectangle2D.Double(); } else { dst = new Rectangle2D.Float(); } Rectangle2D.intersect(this, r, dst); return dst; }
@Override public Rectangle2D createUnion(Rectangle2D r) { if (r instanceof Rectangle) { return union((Rectangle)r); } Rectangle2D dst = new Rectangle2D.Double(); Rectangle2D.union(this, r, dst); return dst; }
@Override public Rectangle2D createUnion(Rectangle2D r) { Rectangle2D dst; if (r instanceof Double) { dst = new Rectangle2D.Double(); } else { dst = new Rectangle2D.Float(); } Rectangle2D.union(this, r, dst); return dst; }
@Override public Rectangle2D createIntersection(Rectangle2D r) { if (r instanceof Rectangle) { return intersection((Rectangle) r); } Rectangle2D dst = new Rectangle2D.Double(); Rectangle2D.intersect(this, r, dst); return dst; }
public Point2D deltaTransform(Point2D src, Point2D dst) { if (dst == null) { if (src instanceof Point2D.Double) { dst = new Point2D.Double(); } else { dst = new Point2D.Float(); } } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01, x * m10 + y * m11); return dst; }