Examples of clipRect()


Examples of java.awt.Graphics2D.clipRect()

            // Paint the image
            Graphics2D imageGraphics = (Graphics2D)graphics.create();
            int buttonImageX = (width - buttonImageWidth) / 2;
            int buttonImageY = (height - buttonImageHeight) / 2;
            imageGraphics.translate(buttonImageX, buttonImageY);
            imageGraphics.clipRect(0, 0, buttonImageWidth, buttonImageHeight);
            buttonImage.paint(imageGraphics);
            imageGraphics.dispose();
        }

        @Override
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

            g = g2;
        }
       
        Rectangle2D clip = this.getClippingRectangle();
       
        g.clipRect(
                (int) clip.upperLeftCorner().x,
                (int) clip.upperLeftCorner().y,
                (int) clip.lowerRightCorner().x + 1,
                (int) clip.lowerRightCorner().y + 1);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

                    (int) bound.getBoundingBox().lowerRightCorner().y + 20);
        }
       
        Rectangle2D clip = this.getClippingRectangle();
       
        g.clipRect(
                (int) clip.upperLeftCorner().x,
                (int) clip.upperLeftCorner().y,
                (int) clip.lowerRightCorner().x,
                (int) clip.lowerRightCorner().y);
       
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

            g = g2;
        }

        Rectangle2D clip = this.getClippingRectangle();
       
        g.clipRect(
                (int) clip.upperLeftCorner().x,
                (int) clip.upperLeftCorner().y,
                (int) clip.lowerRightCorner().x,
                (int) clip.lowerRightCorner().y);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        scaleFactor / 100d);
    int w = (int)(pageFormat.getImageableWidth() *
        scaleFactor / 100d);
    int h = (int)(pageFormat.getImageableHeight() *
        scaleFactor / 100d);
    g2.clipRect(x, y, w, h);
    g2.scale(scaleFactor / 100, scaleFactor / 100);
    try {
      printable.print(g, pageFormat, displayPage);
    } catch (PrinterException pe) {};
    g2.setTransform(at);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

                    decoratedGraphics = decorator.prepare(component, decoratedGraphics);
                }

                // Paint the component
                Graphics2D componentGraphics = (Graphics2D)decoratedGraphics.create();
                componentGraphics.clipRect(0, 0, componentBounds.width, componentBounds.height);
                component.paint(componentGraphics);
                componentGraphics.dispose();

                // Update the decorators
                for (int j = 0; j < n; j++) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.setSize(Math.max(contentBounds.width - (padding.left + padding.right + 2) + 1,
            0), Math.max(contentBounds.height - (padding.top + padding.bottom + 2) + 1, 0));

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.render(buttonData, radioButton, false);
        dataRenderer.setSize(Math.max(width - (BUTTON_DIAMETER + spacing * 2), 0), height);

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(BUTTON_DIAMETER + spacing, 0);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        // Paint the focus state
        if (radioButton.isFocused()) {
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

        dataRenderer.setSize(Math.max(contentBounds.width - (padding.left + padding.right + 2) + 1, 0),
            Math.max(contentBounds.height - (padding.top + padding.bottom + 2) + 1, 0));

        Graphics2D contentGraphics = (Graphics2D)graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
View Full Code Here

Examples of java.awt.Graphics2D.clipRect()

            Math.max(getHeight() - paddingHeight(), 0)
        );

        Graphics2D contentGraphics = (Graphics2D) graphics.create();
        contentGraphics.translate(padding.left + 1, padding.top + 1);
        contentGraphics.clipRect(0, 0, dataRenderer.getWidth(), dataRenderer.getHeight());
        dataRenderer.paint(contentGraphics);
        contentGraphics.dispose();

        graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
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.