Examples of fillRect()


Examples of java.awt.Graphics2D.fillRect()

        Graphics2D g = GraphicsEnvironment.getLocalGraphicsEnvironment().createGraphics(img);
       
        g.setColor(Color.WHITE);
        g.fillRect(0,0,50,10);
        g.setColor(mColor);
        g.fillRect(0,0,50,10);
       
        ImageIcon icon = new ImageIcon(img);
       
        return icon;
    }
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

        g2.setPaint(new GradientPaint(0, 0, c1, getWidth(), 0, new Color(255,
            255, 255, 0)));

        // Paint under the JLabel's text
        g2.fillRect(0, 0, getWidth(), mGhostImage.getHeight());

        // Finished with the graphics context now
        g2.dispose();

        mCurrentPoint = e.getDragOrigin();
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

           
            Graphics2D g2 = (Graphics2D) g;
            g2.setRenderingHints(hints);
           
            g2.setColor(new Color(255, 255, 255, (int) (alphaLevel * shield)));
            g2.fillRect(0, 0, getWidth(), getHeight());
           
            for (int i = 0; i < ticker.length; i++) {
                int channel = 224 - 128 / (i + 1);
                g2.setColor(new Color(channel, channel, channel, alphaLevel));
                g2.fill(ticker[i]);
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

    }

    Color bgColor = null;
    Graphics2D g2d = outImage.createGraphics();
    g2d.setColor(bgColor);
    g2d.fillRect(0, 0, scaledW, scaledH);
    g2d.drawImage(inImage, tx, null);
    g2d.dispose();

    label.setIcon(new ImageIcon(outImage));
    label.setProperty("horizontalAlignment", new Integer(JLabel.CENTER));
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

                 */
                if (leaveShadow) {
                    gr2d.drawImage(bufferedMapImage, 0, 0, null);
                } else {
                    gr2d.setPaint(mb.getBckgrnd());
                    gr2d.fillRect(0, 0, mb.getWidth(), mb.getHeight());
                }

                /*
                 * Drawing image whith transparence and in the mouse position
                 * minus origianl mouse click position
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

        int middleY = height / 2;

        g.setBackground(OMColor.clear);
        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        g.drawLine(0, middleY, width, middleY);

        int upTip = (int) ((float) height * .25);
 
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

        BufferedImage bigImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = (Graphics2D) bigImage.getGraphics();

        g.setBackground(OMColor.clear);
        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
View Full Code Here

Examples of java.awt.Graphics2D.fillRect()

        BufferedImage bigImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = (Graphics2D) bigImage.getGraphics();

        g.setBackground(OMColor.clear);
        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
View Full Code Here

Examples of javafx.scene.canvas.GraphicsContext.fillRect()

            double timeShare = profileNode.getTotalTimeShare();
            double scaledShare = timeShare * IMAGE_WIDTH;
            double xStart = IMAGE_WIDTH - scaledShare;
            context.setFill(Color.GREEN);
            context.fillRect(xStart, 0, scaledShare, IMAGE_HEIGHT);

            Color color = timeShare > 0.5 ? WHEAT : RED;
            context.setFill(color);
            context.fillText(renderTimeShare(timeShare), TEXT_HORIZONTAL_INSET, TEXT_VERTICAL_INSET);

View Full Code Here

Examples of javax.microedition.lcdui.Graphics.fillRect()

    //#endif
    Graphics g = offscreen.getGraphics();
    // Draw background
    g.setColor(background);
    if (aBody) {
      g.fillRect(0, 0, width, height);
    }
    // Draw text
    g.setColor(foreground);
    drawText(g);
    if (aBody) {
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.