Package java.awt.geom

Examples of java.awt.geom.GeneralPath.curveTo()


        shape2.closePath();
        shape2.moveTo(14.640625, 17.648438);
        shape2.lineTo(16.582031, 17.648438);
        shape2.lineTo(15.984375, 16.0625);
        shape2.curveTo(15.802081, 15.580734, 15.666664, 15.184901, 15.578125, 14.875);
        shape2.curveTo(15.505205, 15.242192, 15.402341, 15.606775, 15.269531, 15.96875);
        shape2.closePath();
        g.fill(shape2);
    }

    private void paintCompositeGraphicsNode_0_0_0_2(Graphics2D g)
View Full Code Here


                    //next draw the line from the previous
                    //coord to the intermediate coord, and
                    //curve around the corner
                    path.lineTo((float) intX0, (float) intY0);
                    path.curveTo((float) x1, (float) y1, (float) x1,
                            (float) y1, (float) intX1, (float) intY1);
                    prevX = x2;
                    prevY = y2;
                }
            }
View Full Code Here

                            _coordinate[c + 2], _coordinate[c + 3]);
                    c += 4;
                    break;

                case PathIterator.SEG_CUBICTO:
                    p.curveTo(_coordinate[c], _coordinate[c + 1],
                            _coordinate[c + 2], _coordinate[c + 3],
                            _coordinate[c + 4], _coordinate[c + 5]);
                    c += 6;
                    break;
                }
View Full Code Here

                                cp2Y = (float)( scaleY * ( vpY + mr.ElementAt( j*6+6 ).intValue()));

                                endX = (float)( scaleX * ( vpX + mr.ElementAt( j*6+7 ).intValue()));
                                endY = (float)( scaleY * ( vpY + mr.ElementAt( j*6+8 ).intValue()));

                                gp.curveTo( cp1X, cp1Y, cp2X, cp2Y, endX, endY );
                                _startX = endX;
                                _startY = endY;
                            }
                                //gp.closePath();
                            g2.setStroke( solid );
View Full Code Here

            }
            midx = (curx + prevx) / 2.0f;
            midy = (cury + prevy) / 2.0f;
            float x2 = (prevx + midx) / 2.0f;
            float y2 = (prevy + midy) / 2.0f;
            gp.curveTo(x1, y1, x2, y2, midx, midy);
        }
        gp.closePath();
        if (doDraw) {
            g2.setPaint(drawPaint);
            g2.setStroke(stroke);
View Full Code Here


    public void render(int w, int h, Graphics2D g2) {
        GeneralPath p = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
        p.moveTo(w*.2f, h*.25f);
        p.curveTo(w*.4f, h*.5f, w*.6f, 0.0f, w*.8f, h*.25f);
        p.moveTo(w*.2f, h*.6f);
        p.quadTo(w*.5f, h*1.0f, w*.8f, h*.6f);
        g2.setColor(LIGHT_GRAY);
        g2.fill(p);
        g2.setColor(BLACK);
View Full Code Here

                }
                midx = (curx + prevx) / 2.0f;
                midy = (cury + prevy) / 2.0f;
                float x2 = (prevx + midx) / 2.0f;
                float y2 = (prevy + midy) / 2.0f;
                gp.curveTo(x1, y1, x2, y2, midx, midy);
            }
            gp.closePath();

            g2.setColor(blueBlend);
            g2.setStroke(bs);
View Full Code Here

     
      Component unitEventHandlerPanel = handlerActivityPanel.getComponent(scopeActivity.getEventHandlers().length - i -1);
     
      int y = unitEventHandlerPanel.getY() + unitEventHandlerPanel.getHeight()/2;
      shape.lineTo(x, y-10);
      shape.curveTo(x, y-10, x, y, x+10, y);
     
      int handlerPanelX = handlerActivityPanel.getX() + 10;
     
      shape.lineTo(handlerPanelX, y);
View Full Code Here

        int roundCornerDiff = (endY-startY)/2;
        if(roundCornerDiff < -10) roundCornerDiff = -10;
        if(roundCornerDiff > 10) roundCornerDiff = 10;     

        if(roundCornerDiff!=0){
          path.curveTo(startX, startY, startX+10, startY, startX+10, startY+roundCornerDiff);
          path.lineTo(startX+10, endY-roundCornerDiff);
          path.curveTo(startX+10, endY-roundCornerDiff, startX+10, endY, startX+20, endY);
        }

        path.lineTo(endX, endY);
View Full Code Here

        if(roundCornerDiff > 10) roundCornerDiff = 10;     

        if(roundCornerDiff!=0){
          path.curveTo(startX, startY, startX+10, startY, startX+10, startY+roundCornerDiff);
          path.lineTo(startX+10, endY-roundCornerDiff);
          path.curveTo(startX+10, endY-roundCornerDiff, startX+10, endY, startX+20, endY);
        }

        path.lineTo(endX, endY);
       
        if((latter instanceof ArrowReceiver && ((ArrowReceiver)latter).receiveArrow()) || latter instanceof ActivityLabel){
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.