Exemplo n.º 1
0
 private static void paintCurve2D(Graphics2D g, RemoteCurve curve, boolean fill) {
   try {
     if (curve.getControlX2() != null && curve.getControlY2() != null)
       paintCubeCurve2D(g, curve, fill);
     else paintQuadCurve2D(g, curve, fill);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Exemplo n.º 2
0
 private static void paintCubeCurve2D(Graphics g, RemoteCurve curve, boolean fill) {
   Graphics2D g2d = (Graphics2D) g;
   try {
     // Rectangle bounds = arc.getBounds();
     CubicCurve2D.Double arc2D =
         new CubicCurve2D.Double(
             curve.getX(),
             curve.getY(),
             curve.getWidth(),
             curve.getHeight(),
             curve.getControlX(),
             curve.getControlY(),
             curve.getControlX2(),
             curve.getControlY2());
     if (fill) g2d.fill(arc2D);
     else g2d.draw(arc2D);
   } catch (Exception e) {
     e.printStackTrace();
     // System.out.println(e);
   }
 }