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.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageRenderer
public ImageRenderer()
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)