Package java.awt.geom

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


      case SHAPE_REVEAL:
        a = new Area( new Ellipse2D.Float(
          1.5f * scale, 1.5f * scale, 7f * scale, 7f * scale ));
       
        a.subtract( new Area( new Ellipse2D.Float(
          2.75f * scale, 2.75f * scale, 4.5f * scale, 4.5f * scale )));
        icon.subtract( a );
       
        gp = new GeneralPath();
        gp.moveTo( 7.5f * scale, 6.25f * scale );
View Full Code Here


                        (height - textHeight) / 2 + ascent);
                } else {
                    // Paint the unselected text
                    Area unselectedArea = new Area();
                    unselectedArea.add(new Area(new Rectangle(0, 0, width, height)));
                    unselectedArea.subtract(new Area(selection));

                    Graphics2D textGraphics = (Graphics2D)graphics.create();
                    textGraphics.setColor(colorLocal);
                    textGraphics.clip(unselectedArea);
                    textGraphics.drawGlyphVector(glyphVector, padding.left - scrollLeft + 1,
View Full Code Here

                                rowY -= (int)((verticalSpacing * 0.5f) - 0.5f);
                            }

                            Rectangle2D.Float bounds = new Rectangle2D.Float(columnX, rowY,
                                columnWidth, rowHeight);
                            gridClip.subtract(new Area(bounds));
                        }
                    }

                    componentX += columnWidths[j] + horizontalSpacing;
                }
View Full Code Here

        Ellipse2D ellipse = new Ellipse2D.Double(-c.getWidth(),
                c.getHeight() / 3.0, c.getWidth() * 3.0,
                c.getHeight() * 2.0);

        Area area = new Area(new Rectangle(0, 0, c.getWidth(), c.getHeight()));
        area.subtract(new Area(ellipse));
        area.intersect(new Area(rect));

        alpha = 0.1f;
        if (composite instanceof AlphaComposite) {
            alpha *= ((AlphaComposite) composite).getAlpha();
View Full Code Here

            g2.drawLine(width, 0, width, height);
            g2.drawLine(width + 1, 0, width + 1, height);

            RoundRectangle2D roundCasing = new RoundRectangle2D.Double(0, 2, width, height - 4, width, width);
            Area area = new Area(casing);
            area.subtract(new Area(roundCasing));
            g2.fill(area);

            g2.translate(-trackBounds.x - 2, -trackBounds.y);
        } else {
            int width = trackBounds.width;
View Full Code Here

            g2.drawLine(0, height, width, height);
            g2.drawLine(0, height + 1, width, height + 1);

            RoundRectangle2D roundCasing = new RoundRectangle2D.Double(2, 0, width - 4, height, height, height);
            Area area = new Area(casing);
            area.subtract(new Area(roundCasing));
            g2.fill(area);

            g2.translate(-trackBounds.x, -trackBounds.y - 2);
        }
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

            if(!isLowerCase && formLevel > 0 &&  currentShape!=null && gs.getClippingShape()!=null && gs.nonstrokeColorSpace.getID()== ColorSpaces.DeviceCMYK && gs.nonstrokeColorSpace.getColor().getRGB()==-1){

                //System.out.println(currentShape.getPathIterator(null).)
                Area a=gs.getClippingShape();
                a.subtract(new Area(currentShape));
                currentShape=a;

            }

            //save for later
View Full Code Here

            }
            public void paintIcon(Component c, Graphics g, int x, int y) {
                g = g.create();
                Area area = new Area(new Rectangle(x, y, getIconWidth(), getIconHeight()));
                // X11 needs more of a window due to differences in event processing
                area.subtract(new Area(new Rectangle(x + cursorOffset.x-1, y + cursorOffset.y-1, 3, 3)));
                g.setClip(area);
                icon.paintIcon(c, g, x, y);
                g.dispose();
            }
           
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.