com.jhlabs.image
Class RenderTextFilter

java.lang.Object
  extended by com.jhlabs.image.AbstractBufferedImageOp
      extended by com.jhlabs.image.RenderTextFilter
All Implemented Interfaces:
java.awt.image.BufferedImageOp, java.lang.Cloneable

public class RenderTextFilter
extends AbstractBufferedImageOp

A filter which renders text onto an image.


Constructor Summary
RenderTextFilter()
          Construct a RenderTextFilter.
RenderTextFilter(java.lang.String text, java.awt.Font font, java.awt.Paint paint, java.awt.Composite composite, java.awt.geom.AffineTransform transform)
          Construct a RenderTextFilter.
 
Method Summary
 java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
           
 java.awt.Composite getComposite()
          Get the composite with which to paint the text.
 java.awt.Font getFont()
          Get the font with which to paint the text.
 java.awt.Paint getPaint()
          Get the paint with which to paint the text.
 java.lang.String getText()
          Get the text to paint.
 java.awt.geom.AffineTransform getTransform()
          Get the transform with which to paint the text.
 void setComposite(java.awt.Composite composite)
          Set the composite with which to paint the text.
 void setFont(java.awt.Font font)
          Set the font with which to paint the text.
 void setPaint(java.awt.Paint paint)
          Set the paint with which to paint the text.
 void setText(java.lang.String text)
          Set the text to paint.
 void setTransform(java.awt.geom.AffineTransform transform)
          Set the transform with which to paint the text.
 
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderTextFilter

public RenderTextFilter()
Construct a RenderTextFilter.


RenderTextFilter

public RenderTextFilter(java.lang.String text,
                        java.awt.Font font,
                        java.awt.Paint paint,
                        java.awt.Composite composite,
                        java.awt.geom.AffineTransform transform)
Construct a RenderTextFilter.

Parameters:
text - the text
font - the font to use (may be null)
paint - the paint (may be null)
composite - the composite (may be null)
transform - the transform (may be null)
Method Detail

setText

public void setText(java.lang.String text)
Set the text to paint.

Parameters:
text - the text
See Also:
getText()

getText

public java.lang.String getText()
Get the text to paint.

Returns:
the text
See Also:
setText(java.lang.String)

setComposite

public void setComposite(java.awt.Composite composite)
Set the composite with which to paint the text.

Parameters:
composite - the composite
See Also:
getComposite()

getComposite

public java.awt.Composite getComposite()
Get the composite with which to paint the text.

Returns:
the composite
See Also:
setComposite(java.awt.Composite)

setPaint

public void setPaint(java.awt.Paint paint)
Set the paint with which to paint the text.

Parameters:
paint - the paint
See Also:
getPaint()

getPaint

public java.awt.Paint getPaint()
Get the paint with which to paint the text.

Returns:
the paint
See Also:
setPaint(java.awt.Paint)

setFont

public void setFont(java.awt.Font font)
Set the font with which to paint the text.

Parameters:
font - the font
See Also:
getFont()

getFont

public java.awt.Font getFont()
Get the font with which to paint the text.

Returns:
the font
See Also:
setFont(java.awt.Font)

setTransform

public void setTransform(java.awt.geom.AffineTransform transform)
Set the transform with which to paint the text.

Parameters:
transform - the transform
See Also:
getTransform()

getTransform

public java.awt.geom.AffineTransform getTransform()
Get the transform with which to paint the text.

Returns:
the transform
See Also:
setTransform(java.awt.geom.AffineTransform)

filter

public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src,
                                           java.awt.image.BufferedImage dst)