fragmento delcódigo
Graphics2D g2 = (Graphics2D)g;
int w = getSize().width;
int h = getSize().height;
// Se dibuja la imagen
Image im = (new ImageIcon("1600x1200.jpg")).getImage();
// Se prepara el texto
FontRenderContext frc = g2.getFontRenderContext();
Font f = new Font("Arial Black",Font.BOLD,180);
TextLayout tl = new TextLayout("JavaFace",f,frc);
float sw = (float)tl.getBounds().getWidth();
AffineTransform transform = new AffineTransform();
transform.setToTranslation(w/2-sw/2,h*5/8);
Shape shape = tl.getOutline(transform);
// Se dibuja la imagen en el interior del contorno
g2.setClip(shape);
g2.drawImage(im,0,0,this);
// Se dibuja sólo el contorno
g2.setColor(Color.YELLOW);
g2.draw(shape);
Insurance Bufete de Abogados Bolsa loans Tecnología Cord Blood Hosting Seguros Cooking Recipes Health Web Hosting and Domains Juguetes para niños Rehab Salud Trading Credit Donar Auto en Crédito Fiscal Degree banks Moda y Diseño Recetas de Cocina Software Los préstamos y donaciones hybrid Cars Loans Casino reviews Mortgage Hoteles Attomey Política Defensa Penal Abogados de la Florida Lawyer Donate Forex Commodities Structures Annuity Settlement Claim Recovery Conference Call Condominiums Online Making Money Hosting gratuito Transfer Gas/Electricity Classes Treatment Cómo hacer dinero en línea Web Hosting y Dominios Technology Fotografía digital
No hay comentarios:
Publicar un comentario