This section illustrates you how to show the textured text.
Texture refers to the roughness of the smoothness of a work of art. The way in which you paint involves texture. A texture is a bitmap image applied to the surface in computer graphics. We can also fill our graphics shapes with textures.
We are providing you an example that will show the textured text. The BufferedImage data is copied by the TexturePaint object. The method getTextureImage() get the texture image. The class TexturePaint provides an impressive way to fill a shape with a repeating pattern. The Font class defines the font. The method bufferedImage.createGraphics() draw the graphics into the BufferedImage. Using setPaint() method, different colors are defined to show the texture..
Here is the code of TextTexturedExample.java
Output will be displayed as:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Discuss: Text Texture Example
Post your Comment