Package java.awt.geom

Examples of java.awt.geom.QuadCurve2D$Float


                g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
            }
            else if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
                QuadCurve2D q = new QuadCurve2D.Float();
                q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
                g2.draw(q);
                g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
            }
            else if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
                CubicCurve2D c = new CubicCurve2D .Float();
View Full Code Here


                g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
            }
            else if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
                QuadCurve2D q = new QuadCurve2D.Float();
                q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
                g2.draw(q);
                g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
            }
            else if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
                CubicCurve2D c = new CubicCurve2D .Float();
View Full Code Here

            if (LineUtil.distanceSquared(p[0], p[1], q[0], q[1]) < thr * thr) {
                return true;
            }
        }
        if (type != DrawAttr.PAINT_STROKE) {
            QuadCurve2D curve = getCurve(null);
            if (curve.contains(loc.getX(), loc.getY())) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

        return ret;
    }

    @Override
    public void paint(Graphics g, HandleGesture gesture) {
        QuadCurve2D curve = getCurve(gesture);
        if (setForFill(g)) {
            ((Graphics2D) g).fill(curve);
        }
        if (setForStroke(g)) {
            ((Graphics2D) g).draw(curve);
View Full Code Here

        return c == null ? grey1 : c;

    }

    public SortedSet<Shape> curveOverlap(double x) {
        QuadCurve2D tcurve = new QuadCurve2D.Double();
        tcurve.setCurve(x, 0, x, 0, x, 0);
        SortedSet overlap = new TreeSet(arcsByStart.headSet(tcurve, true));
        overlap.retainAll(arcsByEnd.tailSet(tcurve, true));
        return overlap;
    }
View Full Code Here

    public void drawPoint(int x, int y) throws ExpressionException {
      drawLine(x, y, x + 1, y);
    }
   
    public void drawQuadraticCurve(double x1, double y1, double ctrlx, double ctrly, double x2, double y2throws ExpressionException {
      QuadCurve2D curve = new QuadCurve2D.Double(x1, y1, ctrlx, ctrly, x2, y2);
      getGraphics().draw(curve);
    }
View Full Code Here

        //Aplicamos la transformacion del objeto si la tiene
        if (!this.transformaciones.isIdentity()) {
            g2.transform(this.transformaciones);
        }

        QuadCurve2D quad = new QuadCurve2D.Double(this.puntoInicial.x, this.puntoInicial.y, this.ptoControl.x, this.ptoControl.y, this.puntoFinal.x, this.puntoFinal.y);

        g2.setStroke(this.cg.getEstiloLinea());

        //Dibujamos la linea
        g2.setColor(this.cg.getColorLinea());
View Full Code Here

                g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
            }
            else if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
                QuadCurve2D q = new QuadCurve2D.Float();
                q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
                g2.draw(q);
                g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
            }
            else if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
                CubicCurve2D c = new CubicCurve2D .Float();
View Full Code Here

                g2.draw(new Line2D.Double(linkX, linkY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, elbowX, elbowY));
                g2.draw(new Line2D.Double(anchorX, anchorY, targetX, targetY));
            }
            else if (style.equals(PieLabelLinkStyle.QUAD_CURVE)) {
                QuadCurve2D q = new QuadCurve2D.Float();
                q.setCurve(targetX, targetY, anchorX, anchorY, elbowX, elbowY);
                g2.draw(q);
                g2.draw(new Line2D.Double(elbowX, elbowY, linkX, linkY));
            }
            else if (style.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
                CubicCurve2D c = new CubicCurve2D .Float();
View Full Code Here

      if( ( direction1 > 0 && direction2 > 0 ) || ( direction1 < 0 && direction2 < 0 ) )
      {
        if( Settings.CURVED_EDGES )
        {
          QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos2.getX(), (int)tempPos2.getY(), pivotX, pivotY, (int)tempPos.getX(),
              (int)tempPos.getY() );
          g2d.draw( quadCurve );
        }
        else
        {
          g2d.drawLine( x2, y2, x1, y1 );
        }
      }
      else
      {
        if( Settings.CURVED_EDGES )
        {
          QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos2.getX(), (int)tempPos2.getY(), pivotX, pivotY, (int)tempPos.getX(),
              (int)tempPos.getY() );
          g2d.draw( quadCurve );
        }
        else
        {
          g2d.drawLine( x2, y2, x1, y1 );
        }
      }

      if( tempEdge.isDirectional() )
      {
        int x[] = { x1, (int)Math.round( x1 + arrowHeadLength * Math.cos( angle1 ) ),
            (int)Math.round( x1 + arrowHeadLength * Math.cos( angle2 ) ) };
        int y[] = { y1, (int)Math.round( y1 + arrowHeadLength * Math.sin( angle1 ) ),
            (int)Math.round( y1 + arrowHeadLength * Math.sin( angle2 ) ) };
        g2d.fillPolygon( x, y, 3 );
      }
    }
    else
    {
      if( Settings.CURVED_EDGES )
      {
        QuadCurve2D quadCurve = new QuadCurve2D.Float( (int)tempPos.getX(), (int)tempPos.getY(), pivotX, pivotY, (int)tempPos2.getX(),
            (int)tempPos2.getY() );
        g2d.draw( quadCurve );
      }
      else
      {
View Full Code Here

TOP

Related Classes of java.awt.geom.QuadCurve2D$Float

Copyright © 2018 www.massapicom. 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.