Package java.awt

Examples of java.awt.Graphics2D.fill()


            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.translate(knobBounds.x, knobBounds.y);

            g2d.setColor(Color.CYAN);
            g2d.fill(thumbShape);

            g2d.setColor(Color.BLUE);
            g2d.draw(thumbShape);

            // Dispose graphics.
View Full Code Here


            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.translate(knobBounds.x, knobBounds.y);

            g2d.setColor(Color.PINK);
            g2d.fill(thumbShape);

            g2d.setColor(Color.RED);
            g2d.draw(thumbShape);

            // Dispose graphics.
View Full Code Here

                    tempRingVect.addElement(tempScreenPoints);
                }
            }
        }
        Graphics2D tempG2D = (Graphics2D) inGraphics;
        tempG2D.fill(tempPath);
        /*
        // Find the largest Y coordinate, and minimum X coordinate, the following routine
        // will scann from minX to MaxX finding intersections lower than the maximum Y.
        // it is important that the MaxY be higher than all the points in the shape.
        int tempMinX = inConverter.toScreenX(tempPolygon.getExtents().myTopX) - 1;
View Full Code Here

        Graphics2D g2 = (Graphics2D)g;
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

        g2.setColor(Color.black);
        g2.fill(getBounds());

        if(image != null) {
            int x = 0;
            int y = 0;
View Full Code Here

        RoundRectangle2D r = new RoundRectangle2D.Double(getX(), getY(),
                getWidth(), getHeight(), 35, 35);
        Line2D l = new Line2D.Double(getX(), getY() + 25, getX() + getWidth(),
                getY() + 25);
        g2d.setColor(Color.white);
        g2d.fill(r);
        g2d.setColor(Color.blue);
        g2d.draw(r);
        g2d.draw(l);

        g2d.setColor(Color.black);
View Full Code Here

        //Rectangle2D r = new Rectangle2D.Double(getX(), getY(), getWidth(),
        // getHeight());
        Line2D l = new Line2D.Double(getX(), 25 + getY(), getWidth() + getX(),
                getY() + 25);
        g2d.setColor(Color.white);
        g2d.fill(r);
        g2d.setColor(Color.blue);
        g2d.draw(r);
        g2d.draw(l);

        g2d.setColor(Color.black);
View Full Code Here

        RoundRectangle2D r = new RoundRectangle2D.Double(getX(), getY(),
                getWidth(), getHeight(), 1, 1);
        Line2D l = new Line2D.Double(getX(), 25 + getY(), getWidth() + getX(),
                25 + getY());
        g2d.setColor(Color.white);
        g2d.fill(r);
        g2d.setColor(Color.blue);
        g2d.draw(r);
        g2d.draw(l);

        g2d.setColor(Color.black);
View Full Code Here

                    g2d = (Graphics2D) g;

                    g2d.setColor(new Color(255, 255, 255));
                    r = new Rectangle2D.Double(0, 0, img.getWidth(), img
                            .getHeight());
                    g2d.fill(r);

                    mpdComponent.paintComponent(g2d);

                    PNGImageWriter writer = new PNGImageWriter(null);
View Full Code Here

        g2d = (Graphics2D) g;

        g2d.setColor(new Color(255, 255, 255));
        r = new Rectangle2D.Double(0, 0, img.getWidth(), img
                .getHeight());
        g2d.fill(r);

        mcd.paintComponent(g2d);

        PNGImageWriter writer = new PNGImageWriter(null);
View Full Code Here

        g2d = (Graphics2D) g;

        g2d.setColor(new Color(255, 255, 255));
        r = new Rectangle2D.Double(0, 0, img.getWidth(), img
                .getHeight());
        g2d.fill(r);

        mpd.paintComponent(g2d);

        writer = new PNGImageWriter(null);
        writer.setOutput(outputStream = new FileImageOutputStream(imageFile));
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.