Package java.awt.geom

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


            MyArea ma2 = new MyArea(aa2, cores[1]);
            ma2.calculateArea("aa2");

            Area aa3 = new Area(a3);
            aa3.subtract(a1);
            aa3.subtract(a2);
            MyArea ma3 = new MyArea(aa3, cores[2]);
            ma3.calculateArea("aa3");

            // adding the color area
            for (int i = 0; i != 16; i++) {
View Full Code Here


                              srcBounds.height + topPad +
                              oldParamBlock.getIntParameter(3));

            // Determine invalid area by subtracting source bounds.
            Area invalidArea = new Area(dstBounds);
            invalidArea.subtract(new Area(srcBounds));
            invalidRegion = invalidArea;

        } else if((newParamBlock.getIntParameter(1) <   // new R < old R
            oldParamBlock.getIntParameter(1) &&
            newParamBlock.getIntParameter(3) <=  // new B <= old B
View Full Code Here

                              srcBounds.height + topPad +
                              newParamBlock.getIntParameter(3));

            // Determine invalid area by subtracting new from old bounds.
            Area invalidArea = new Area(oldBounds);
            invalidArea.subtract(new Area(newBounds));
            invalidRegion = invalidArea;

        } else {
            // Either nothing changed or one or both of the right and bottom
            // padding was increased.
View Full Code Here

        }
        //new Color[]{new Color(0xfdad11), new Color(0xf69c18), new Color(0xf7a427), new Color(0xf0a85c)}));
        gfx.fillRect(x + 1, y + 1, width - 2, height - 2);
        // inner background
        Area base = new Area(new Rectangle(x + 2, y + 1, width - 4, height - 3));
        base.subtract(new Area(new Rectangle(x + 2, y + height - 3, 1, 1)));
        base.subtract(new Area(new Rectangle(x + width - 3, y + height - 3, 1, 1)));
        if (2 != height - 4) {
            gfx.setPaint(JideSwingUtilities.getLinearGradientPaint(x + 2, y + 2, x + 2, y + height - 4,
                    new float[]{.39f, .4f, 1f},
                    innerBackgroundColors));
View Full Code Here

        //new Color[]{new Color(0xfdad11), new Color(0xf69c18), new Color(0xf7a427), new Color(0xf0a85c)}));
        gfx.fillRect(x + 1, y + 1, width - 2, height - 2);
        // inner background
        Area base = new Area(new Rectangle(x + 2, y + 1, width - 4, height - 3));
        base.subtract(new Area(new Rectangle(x + 2, y + height - 3, 1, 1)));
        base.subtract(new Area(new Rectangle(x + width - 3, y + height - 3, 1, 1)));
        if (2 != height - 4) {
            gfx.setPaint(JideSwingUtilities.getLinearGradientPaint(x + 2, y + 2, x + 2, y + height - 4,
                    new float[]{.39f, .4f, 1f},
                    innerBackgroundColors));
        }
View Full Code Here

      outlines.add( new Line2D.Double( 0.0, 0.0, dx, dy ));
      outlinePaints.add( pntCtrlOut );
      arc1.setAngleStart( angDeg - 90 - speakerWidth/2 );
      arc2.setAngleStart( angDeg - 90 - speakerWidth/2 );
      area  = new Area( arc1 );
      area.subtract( new Area( arc2 ));
      areas.add( area );
      areaPaints.add( pntCtrlIn );
    }
   
    setMinimumSize( new Dimension( 64, 64 ));
View Full Code Here

                            oldOpImage.getTileHeight();
                        Rectangle tileBounds = new Rectangle(x, y, w, h);
                        Rectangle imageBounds = oldOpImage.getBounds();
                        if(!tileBounds.equals(imageBounds)) {
                            Area tmpArea = new Area(tileBounds);
                            tmpArea.subtract(new Area(imageBounds));
                            srcInvalidRegion = tmpArea;
                            srcInvalidBounds = srcInvalidRegion.getBounds();
                        }
                    }
View Full Code Here

                                    new Rectangle(x, y, w, h);
                                Rectangle imageBounds =
                                    oldRendering.getBounds();
                                if(!tileBounds.equals(imageBounds)) {
                                    Area tmpArea = new Area(tileBounds);
                                    tmpArea.subtract(new Area(imageBounds));
                                    invalidRegion = tmpArea;
                                }
                            }

                            if(invalidRegion.getBounds().isEmpty()) {
View Full Code Here

          oldPISP.getNumYTiles() * oldPISP.getTileHeight();
                        Rectangle tileBounds = new Rectangle(x, y, w, h);
                        Rectangle imageBounds = oldPISP.getBounds();
                        if (!tileBounds.equals(imageBounds)) {
                            Area tmpArea = new Area(tileBounds);
                            tmpArea.subtract(new Area(imageBounds));
                            srcInvalidRegion = tmpArea;
                            srcInvalidBounds = srcInvalidRegion.getBounds();
                        }
                    }

View Full Code Here

            new Rectangle(x, y, w, h);
                                Rectangle imageBounds =
                                    oldRendering.getBounds();
                                if (!tileBounds.equals(imageBounds)) {
                                    Area tmpArea = new Area(tileBounds);
                                    tmpArea.subtract(new Area(imageBounds));
                                    invalidRegion = tmpArea;
                                }
                            }

                            if (invalidRegion.getBounds().isEmpty()) {
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.