Package java.awt

Examples of java.awt.Graphics2D.drawChars()


    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
  }
View Full Code Here


    Graphics2D graphics2D = img.createGraphics();
    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
View Full Code Here

    graphics2D.setBackground(paintData.getBackground());
    graphics2D.setColor(paintData.getDrawColor());
    graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
    graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
    graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
    graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
   
    ImageIO.write(img,"jpeg",out);
   
    }
  }
View Full Code Here

        {
            int msgWidth = g2d.getFontMetrics().charsWidth(verificationMessage, 0, verificationMessage.length);
            g2d.setColor(new Color(128, 128, 128, 128));
            g2d.fillRect(0, 0, getWidth(), getHeight());
            g2d.setColor(fontColor);
            g2d.drawChars(verificationMessage, 0, verificationMessage.length, getWidth()/2 - msgWidth/2, getHeight()/2);
        }
    }

    public void setVerifying(boolean b)
    {
View Full Code Here

            g.setFont(itFont);

            GlyphVector gv = itFont.createGlyphVector(frc, itchar);
            double charWitdth = gv.getVisualBounds().getWidth();

            g.drawChars(itchar, 0, itchar.length, startPosX, 35);
            startPosX = startPosX + (int) charWitdth;
        }
    }
}
View Full Code Here

        int pos = startData + i;
        // Draw notes
        if (noteData[pos % maxLen] != null) {
    int charWidth = g.getFontMetrics().charWidth('N');
    int charHeight = g.getFontMetrics().getAscent();
    g.drawChars(NOTE_CHAR, 0, 1, x + (int) (i * xspace) - charWidth/2, y + charHeight);

    // Save coordinate
    this.notesCoords[j][pos % maxLen] =
      new Point(x + (int) (i * xspace) - charWidth/2, y + charHeight);
        }
View Full Code Here

            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.fill(area);
            if (this.drawColorNames) {
                final String goalColorShort = Board.getColorShortL10N(goal.robotNumber);
                g2d.setColor(Color.BLACK);
                g2d.drawChars(goalColorShort.toCharArray(), 0, 1, width / 2 - 3, height / 2 + 3);
            }
            g2d.dispose();
        }

        @Override
View Full Code Here

            g2d.setColor(outlineColor); g2d.draw(shapeFoot);
            g2d.setPaint(fillPaint);    g2d.fill(shapeBody);
            g2d.setColor(outlineColor); g2d.draw(shapeBody);
            if (this.drawColorNames) {
                g2d.setColor(Color.WHITE);
                g2d.drawChars(Board.getColorShortL10N(this.robot).toCharArray(), 0, 1, width / 2 - 3, height / 2 + 3);
            }
            g2d.dispose();
        }

        @Override
View Full Code Here

            g2d.setColor(outlineColor); g2d.draw(shapeFoot);
            g2d.setPaint(fillPaint);    g2d.fill(shapeBody);
            g2d.setColor(outlineColor); g2d.draw(shapeBody);
            if (this.drawColorNames) {
                g2d.setColor(Color.WHITE);
                g2d.drawChars(Board.getColorShortL10N(this.robot).toCharArray(), 0, 1, width / 2 - 3, height / 2 + 3);
            }
            g2d.dispose();
        }

        @Override
View Full Code Here

            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.fill(area);
            if (this.drawColorNames) {
                final String goalColorShort = Board.getColorShortL10N(goal.robotNumber);
                g2d.setColor(Color.BLACK);
                g2d.drawChars(goalColorShort.toCharArray(), 0, 1, width / 2 - 3, height / 2 + 3);
            }
            g2d.dispose();
        }

        @Override
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.