Package java.awt.geom

Examples of java.awt.geom.Area


      return;
    }
    s = transform.createTransformedShape(s);
    if (clip == null)
    {
      clip = new Area(s);
    }
    else
    {
      clip.intersect(new Area(s));
    }
    followPath(s, PdfGraphics2D.CLIP);
  }
View Full Code Here


    {
      clip = null;
    }
    else
    {
      clip = new Area(s);
      followPath(s, PdfGraphics2D.CLIP);
    }
    paintFill = null;
    paintStroke = null;
    currentFillGState = 255;
View Full Code Here

    public void setBounds (int x, int y, int w, int h) {
      super.setBounds(x, y, w, h);
      Dimension size = new Dimension(w, h);
      if (mask != null && !size.equals(maskSize)) {
        mask.subtract(mask);
        mask.add(new Area(getMask()));
        maskSize = size;
      }
    }
View Full Code Here

    gPath.moveTo(corner1.x, corner1.y);
    gPath.moveTo(corner2.x, corner2.y);
    gPath.lineTo(corner3.x, corner3.y);
    gPath.lineTo(corner4.x, corner4.y);
    gPath.lineTo(corner1.x, corner1.y);
    outlineArea.add(new Area(gPath));

    if (GLOBAL.shapePack.add_guide_divets) {
      float r = GLOBAL.shapePack.inner_corner_radius;

      Vec2D radCentre1 = getPos().add(
          dir.getRotated((float) Math.PI / 2).scale(-(r / 2))).add(
          dir.getRotated(0).normalize().scale(-tempWidth / 2));
      Vec2D radCentre2 = getPos().add(
          dir.getRotated((float) Math.PI / 2).scale(-(r / 2))).add(
          dir.getRotated(0).normalize().scale(tempWidth / 2));

      Ellipse2D.Float ellipse = new Ellipse2D.Float(radCentre1.x
          - (r / 2), radCentre1.y - (r / 2), r, r);
      outlineArea.add(new Area(ellipse));

      ellipse = new Ellipse2D.Float(radCentre2.x - (r / 2), radCentre2.y
          - (r / 2), r, r);
      outlineArea.add(new Area(ellipse));

    }
   
   
    if (GLOBAL.shapePack.addDogbones) {
      float r = GLOBAL.shapePack.inner_corner_radius;
     
//LOGGER.info(dirToEdge.toString());
     

      int sign = -1;
     
       
      Vec2D radCentre1 = getPos().add(
          dir.getRotated((float) Math.PI / 2).scale(
              (offset + tempLength+(r / 2)) - s1)).add(
                  dir.getRotated(0).normalize().scale((-(tempWidth+(r / 2)) / 2) - s2));

      Vec2D radCentre2 = getPos().add(
          dir.getRotated((float) Math.PI / 2).scale(
              (offset + tempLength+(r / 2)) - s1)).add(
                  dir.getRotated(0).normalize().scale((+(tempWidth+(r / 2)) / 2) - s2));

      Ellipse2D.Float ellipse = new Ellipse2D.Float(radCentre1.x
          - (r / 2), radCentre1.y + ((r / 2)*sign), r, r);
      outlineArea.add(new Area(ellipse));

      ellipse = new Ellipse2D.Float(radCentre2.x - (r / 2), radCentre2.y
          + ((r / 2)*sign), r, r);
      outlineArea.add(new Area(ellipse));

    }
   
    //#ENDIF JAVA
  }
View Full Code Here

   
    //#ENDIF JAVA
  }

  public Area getOutlineGeneralPath() {
    Area outlineArea = new Area();

    float slotOffset = 0;
    for (int i = 1; i < numSlots + 1; i++) {
     
      if (i % 2 == 0) {
View Full Code Here

    return outlineArea;

  }

  public Area getOutlineGeneralPathFingers() {
    Area outlineArea = new Area();

    float slotOffset = 0;
    for (int i = 1; i < numSlots + 1; i++) {
      if (i % 2 == 0) {
        if (this.startOnSlot) {
View Full Code Here

        ClockFace face = new ClockFace(new Dimension(150, 150));
        frame.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
        frame.getContentPane().add(face);
        frame.setUndecorated(true);
        try {
            Shape mask = new Area(new Ellipse2D.Float(0, 0, 150, 150));
            WindowUtils.setWindowMask(frame, mask);
            if (WindowUtils.isWindowAlphaSupported()) {
                WindowUtils.setWindowAlpha(frame, .7f);
            }
            frame.setIconImage(face.getIconImage());
View Full Code Here

            size.height += 100;
            return size;
        }
       
        private Shape getMask() {
            Area area = new Area(parentMask);
            Area clip = new Area(parentMask);

            AffineTransform tx = new AffineTransform();
            tx.translate(Math.sin(ANGLE)*getOwner().getHeight(), 0);
            tx.shear(-Math.tan(ANGLE), 0);
            tx.scale(1, YSCALE);
            tx.translate(0, (1-YSCALE)*getOwner().getHeight());
            area.transform(tx);
            tx = new AffineTransform();
            tx.translate(-OFFSET.x, -OFFSET.y);
            clip.transform(tx);
            area.subtract(clip);
            return area;
        }
View Full Code Here

            getContentPane().setBackground(Color.white);
            getContentPane().add(content, BorderLayout.CENTER);
            getContentPane().add(Box.createVerticalStrut(Y_OFFSET), BorderLayout.SOUTH);
            owner.addComponentListener(moveTracker);
            setSize(getPreferredSize());
            mask = new Area(getMask(getWidth(), getHeight()));
            maskSize = getSize();
            WindowUtils.setWindowMask(BubbleWindow.this, mask);
            if (useDropShadow()) {
                new DropShadow(this, mask);
            }
View Full Code Here

        public void setBounds(int x, int y, int w, int h) {
            super.setBounds(x, y, w, h);
            Dimension size = new Dimension(w, h);
            if (mask != null && !size.equals(maskSize)) {
                mask.subtract(mask);
                mask.add(new Area(getMask(w, h)));
                maskSize = size;
            }
        }
View Full Code Here

TOP

Related Classes of java.awt.geom.Area

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.