Package java.awt.geom

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


                                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


            // Determine the selected and unselected areas
            Area selection = textAreaSkin.getSelection();
            Area selectedArea = selection.createTransformedArea(AffineTransform.getTranslateInstance(-x, -y));
            Area unselectedArea = new Area();
            unselectedArea.add(new Area(new Rectangle2D.Float(0, 0, width, height)));
            unselectedArea.subtract(new Area(selectedArea));

            // Paint the unselected text
            Graphics2D unselectedGraphics = (Graphics2D)graphics.create();
            unselectedGraphics.clip(unselectedArea);
            paint(unselectedGraphics, focused, editable, false);
View Full Code Here

            graphics.drawString(heading, padding.left, lm.getAscent() + padding.top);

            Rectangle2D headingBounds = font.getStringBounds(heading, fontRenderContext);

            Area titleClip = new Area(graphics.getClip());
            titleClip.subtract(new Area(new Rectangle2D.Double(padding.left, padding.top,
                headingBounds.getWidth() + padding.right, headingBounds.getHeight())));
            graphics.clip(titleClip);

            separatorY += (lm.getAscent() + lm.getDescent()) / 2 + 1;
        }
View Full Code Here

            Area gloss = new Area(ellipse);
            if (getPosition() == GlossPosition.TOP) {
                Area area = new Area(new Rectangle(0, 0,
                    width, height));
                area.subtract(new Area(ellipse));
                gloss = area;
            }
            /*
            if(getClip() != null) {
                gloss.intersect(new Area(getClip()));
View Full Code Here

                g2.setComposite(AlphaComposite.Clear);
                g2.setColor(Color.WHITE);
                if (isRenderInsideShape()) {
                    // clip the outside
                    Area area = new Area(effectBounds);
                    area.subtract(new Area(clipShape));
                    g2.fill(area);
                } else {
                    // clip the inside
                    g2.fill(clipShape);
                }
View Full Code Here

        b.add(new Area(upper));
        Area pie = new Area(a);
        pie.intersect(b);

        Area front = new Area(pie);
        front.subtract(new Area(top));

        Area back = new Area(pie);
        back.subtract(new Area(bottom));

        // draw the bottom circle
View Full Code Here

        Area front = new Area(pie);
        front.subtract(new Area(top));

        Area back = new Area(pie);
        back.subtract(new Area(bottom));

        // draw the bottom circle
        int[] xs;
        int[] ys;
View Full Code Here

                    Rectangle selection = new Rectangle(x0, 0, x1 - x0, height);

                    // 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(color);
                    textGraphics.clip(unselectedArea);
                    textGraphics.drawGlyphVector(glyphVector, 0, ascent);
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(color);
                    textGraphics.clip(unselectedArea);
                    textGraphics.drawGlyphVector(glyphVector, padding.left - scrollLeft + 1,
View Full Code Here

//    Point    gpPoint = SwingUtilities.convertPoint( bottomMost, 0, bottomMost.getHeight(), this );

        Graphics2D g2 = (Graphics2D) g;
        g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
        Area a1 = new Area( g.getClipBounds() );
        a1.subtract( focussedArea );
        g2.setColor( colrBg );
        g2.fill( a1 );
        g2.setColor( colrBg2 );
        g2.fill( focussedArea );
     }
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.