org.infoglue.cms.util.graphics
Class ImageRenderer

java.lang.Object
  |
  +--org.infoglue.cms.util.graphics.ImageRenderer

public class ImageRenderer
extends java.lang.Object

This class demonstrates how to line-break and draw a paragraph of text using LineBreakMeasurer and TextLayout. This class constructs a LineBreakMeasurer from an AttributedCharacterIterator. It uses the LineBreakMeasurer to create and draw TextLayouts (lines of text) which fit within the Component's width.


Constructor Summary
ImageRenderer()
           
 
Method Summary
 void generateGifImageFromText(java.lang.String file, java.lang.String text, java.lang.String encoding)
          This method generates a gif-image from the send in string with the given width/height.
 void setBackgroundColor(java.awt.Color backgroundColor)
           
 void setCanvasHeight(int canvasHeight)
           
 void setCanvasWidth(int canvasWidth)
           
 void setFontName(java.lang.String fontName)
           
 void setFontSize(int fontSize)
           
 void setFontStyle(int fontStyle)
           
 void setForeGroundColor(java.awt.Color foreGroundColor)
           
 void setTextHeight(int textHeight)
           
 void setTextStartPosX(int textStartPosX)
           
 void setTextStartPosY(int textStartPosY)
           
 void setTextWidth(int textWidth)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageRenderer

public ImageRenderer()
Method Detail

generateGifImageFromText

public void generateGifImageFromText(java.lang.String file,
                                     java.lang.String text,
                                     java.lang.String encoding)
                              throws java.lang.Exception
This method generates a gif-image from the send in string with the given width/height.

java.lang.Exception

setCanvasHeight

public void setCanvasHeight(int canvasHeight)

setCanvasWidth

public void setCanvasWidth(int canvasWidth)

setTextHeight

public void setTextHeight(int textHeight)

setTextStartPosX

public void setTextStartPosX(int textStartPosX)

setTextStartPosY

public void setTextStartPosY(int textStartPosY)

setTextWidth

public void setTextWidth(int textWidth)

setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)

setForeGroundColor

public void setForeGroundColor(java.awt.Color foreGroundColor)

setFontName

public void setFontName(java.lang.String fontName)

setFontSize

public void setFontSize(int fontSize)

setFontStyle

public void setFontStyle(int fontStyle)