Package java.awt.geom

Examples of java.awt.geom.Rectangle2D.clone()


        dataArea = integerise(dataArea);
        if (dataArea.isEmpty()) {
            return;
        }
        createAndAddEntity((Rectangle2D) dataArea.clone(), info, null, null);
        if (info != null) {
            info.setDataArea(dataArea);
        }

        // draw the plot background and axes...
View Full Code Here


            Rectangle2D cr2d = gn.getBounds(rc);
            AffineTransform at = gn.getTransform();
            if (at != null)
                cr2d = at.createTransformedShape(cr2d).getBounds2D();

            if (r2d == null) r2d = (Rectangle2D)cr2d.clone();
            r2d.add(cr2d);
        }

        if (r2d == null) {
            if (init == null)
View Full Code Here

    public Rectangle2D getBounds2D(){
        if (usePrimitivePaint){
            Rectangle2D primitiveBounds
                = node.getPrimitiveBounds(getGraphicsNodeRenderContext());
            if(primitiveBounds != null){
                return (Rectangle2D)(primitiveBounds.clone());
            }
            else{
                return new Rectangle2D.Double(0, 0, 0, 0);
            }
        }
View Full Code Here

        if (usePrimitivePaint){
            Rectangle2D primitiveBounds = node.getPrimitiveBounds();
            if(primitiveBounds == null)
                return new Rectangle2D.Double(0, 0, 0, 0);

            return (Rectangle2D)(primitiveBounds.clone());
        }

        // When not using Primitive paint we return out bounds in our
        // parent's user space.  This makes sense since this is the
        // space that we will draw our selves into (since paint unlike
View Full Code Here

        Rectangle2D bounds = null;
        for (int i=0; i < count; ++i) {
            Rectangle2D pb = painters[i].getPaintedBounds2D();
            if (pb == null) continue;
            if (bounds == null) bounds = (Rectangle2D)pb.clone();
            else                bounds.add(pb);
        }
        return bounds;
    }
View Full Code Here

            return null;

        Rectangle2D bounds = null;
        for (int i=0; i < count; ++i) {
            Rectangle2D pb = painters[i].getSensitiveBounds2D();
            if (bounds == null) bounds = (Rectangle2D)pb.clone();
            else                bounds.add(pb);
        }
        return bounds;
    }
View Full Code Here

            Rectangle2D cr2d = gn.getBounds();
            AffineTransform at = gn.getTransform();
            if (at != null)
                cr2d = at.createTransformedShape(cr2d).getBounds2D();

            if (r2d == null) r2d = (Rectangle2D)cr2d.clone();
            else             r2d.add(cr2d);
        }

        if (r2d == null) {
            if (init == null)
View Full Code Here

      dataArea = integerise(dataArea);

      if (dataArea.isEmpty())
         return;

      createAndAddEntity((Rectangle2D) dataArea.clone(), info, null, null);

      if (info != null)
         info.setDataArea(dataArea);

      // draw the plot background and axes...
View Full Code Here

      g2.translate(-r.w / 2, -r.h / 2);
      g2.rotate(r.r, r.x + r.w / 2, r.y + r.h / 2);
      g2.draw(rect);
     
      if(selected.contains(r)) {
        Rectangle2D.Float selectionBorder = (Rectangle2D.Float) rect.clone();
        selectionBorder.x -= Settings.SELECTION_BORDER_INSET;
        selectionBorder.y -= Settings.SELECTION_BORDER_INSET;
        selectionBorder.width += Settings.SELECTION_BORDER_INSET * 2;
        selectionBorder.height += Settings.SELECTION_BORDER_INSET * 2;
        g2.setColor(Settings.SELECTION_COLOR);
 
View Full Code Here

        boolean o = (GraphConstants.getOffset(port.getAllAttributes()) != null);
        // ...Then use Parent's Bounds
        Rectangle2D r = (o) ? port.getBounds() : port.getParentView()
            .getBounds();
        // Scale from Model to Screen
        r = graph.toScreen((Rectangle2D) r.clone());
        // Add Space For the Highlight Border
        r.setFrame(r.getX() - 3, r.getY() - 3, r.getWidth() + 6, r
            .getHeight() + 6);
        // Paint Port in Preview (=Highlight) Mode
        graph.getUI().paintCell(g, port, r, true);
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.