Examples of exclusiveOr()


Examples of com.google.code.appengine.awt.geom.Area.exclusiveOr()

            // clipping region and the current shape but without the overlapping areas.
            else if(mode == EMFConstants.RGN_XOR) {
                Shape clip = renderer.getClip();
                if (clip != null) {
                    Area a = new Area(shape);
                    a.exclusiveOr(new Area(clip));
                    renderer.setClip(a);
                } else {
                    renderer.setClip(shape);
                }
            }
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

            for (int i = 0; i != max; i++) {
                pol2.addPoint(translate(p[i * 2 + 1]), translate(p[i * 2 + 2]));
            }

            Area a = new Area(pol);
            a.exclusiveOr(new Area(pol2));
            double z = calculateArea(a);
            // ????
            z = Math.round(z * 100);

            long zz = (long) (z);
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

   */
  public void test(TestHarness harness)     
  {
    Area area = new Area();
    area.add(new Area(new Rectangle2D.Double(-1.0, -1.0, 2.0, 2.0)));
    area.exclusiveOr(new Area(new Rectangle2D.Double(0.0, 0.0, 2.0, 2.0)));
    harness.check(area.contains(-1.0, -1.0))// check 1
    harness.check(area.contains(-1.0, 0.0));   // check 2
    harness.check(!area.contains(-1.0, 1.0))// check 3
    harness.check(!area.contains(-1.0, 2.0))// check 4
    harness.check(area.contains(0.0, -1.0));   // check 5
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

    harness.check(!area.contains(2.0, 2.0));   // check 17

    boolean pass = false;
    try
    {
      area.exclusiveOr(null);
    }
    catch (NullPointerException e)
    {
      pass = true;
    }
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

            g2.draw(p1);
            g2.draw(p2);
            return;
        } else if (areaType.equals("add" )) { area.add        (new Area(p2));
        } else if (areaType.equals("sub" )) { area.subtract   (new Area(p2));
        } else if (areaType.equals("xor" )) { area.exclusiveOr(new Area(p2));
        } else if (areaType.equals("int" )) { area.intersect  (new Area(p2));
        } else if (areaType.equals("pear")) {

            double sx = w/100;
            double sy = h/140;
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

                /**
         * create inverse of clip and paint on to add transparency
         */
        Area inverseClip =new Area(new Rectangle(0,0,image_w,image_h));
        inverseClip.exclusiveOr(final_clip);
        Graphics2D image_g2 = current_image.createGraphics(); //g2 of canvas
        image_g2.setComposite(AlphaComposite.Clear);
        image_g2.fill(inverseClip);

        AffineTransform image_at2 =new AffineTransform();
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

        // Creating template image
        final BufferedImage bi = new BufferedImage ( width, width, BufferedImage.TYPE_INT_ARGB );
        final Graphics2D ig = bi.createGraphics ();
        GraphicsUtils.setupAntialias ( ig );
        final Area area = new Area ( new Rectangle ( 0, 0, width, width ) );
        area.exclusiveOr ( new Area (
                new RoundRectangle2D.Double ( shadeWidth, shadeWidth, width - shadeWidth * 2, width - shadeWidth * 2, round * 2,
                        round * 2 ) ) );
        ig.setPaint ( Color.BLACK );
        ig.fill ( area );
        ig.dispose ();
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

            // Paint icon border
            if ( isPaintBorder () )
            {
                final Area outer = new Area ( new Ellipse2D.Double ( 0, 0, h, h ) );
                final Ellipse2D.Double inner = new Ellipse2D.Double ( 2, 2, h - 4, h - 4 );
                outer.exclusiveOr ( new Area ( inner ) );

                g2d.setColor ( isEnabled () ? getBorderColor () : getDisabledBorderColor () );
                g2d.fill ( outer );

                g2d.setPaint ( isEnabled () ? getBorderBackground () : getDisabledBorderBackground () );
View Full Code Here

Examples of java.awt.geom.Area.exclusiveOr()

  public void paint(PaintContext paintContext) {
    super.paint(paintContext);

    Area a1 = new Area(new Ellipse2D.Double(0, 0, LINE_IN_WIDTH,
        LINE_IN_HEIGHT));
    a1.exclusiveOr(new Area(new Ellipse2D.Double(5.0, 5.0,
        LINE_IN_WIDTH - 10.0, LINE_IN_HEIGHT - 10.0)));
    Graphics2D g2 = paintContext.getGraphics();
    g2.setColor(getColor());
    g2.fill(a1);
  }
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.