com.octo.captcha.component.image.textpaster
Class ChangeableAttributedString
java.lang.Object
com.octo.captcha.component.image.textpaster.ChangeableAttributedString
public class ChangeableAttributedString
- extends java.lang.Object
This class is the decomposition of a single AttributedString into its component glyphs. It wouldn't be necessary if
Java2D correctly handled spacing issues with fonts changed AffineTransformation -- there is a possibility that it
will not be necessary with java 1.5
Constructor Summary |
protected |
ChangeableAttributedString(java.awt.Graphics2D g2,
java.text.AttributedString aString,
int kerning)
Given an attributed string and the graphics environment it lives in, pull it apart into its components. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ChangeableAttributedString
protected ChangeableAttributedString(java.awt.Graphics2D g2,
java.text.AttributedString aString,
int kerning)
- Given an attributed string and the graphics environment it lives in, pull it apart into its components.
- Parameters:
g2
- graphicsaString
- attributed String
shiftBoundariesToNonLinearLayout
protected void shiftBoundariesToNonLinearLayout(double backgroundWidth,
double backgroundHeight)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
length
public int length()
getX
public double getX(int index)
getY
public double getY(int index)
getHeight
public double getHeight(int index)
getTotalWidth
public double getTotalWidth()
getWidth
public double getWidth(int index)
getAscent
public double getAscent(int index)
getMaxWidth
public double getMaxWidth()
getMaxAscent
public double getMaxAscent()
getMaxDescent
public double getMaxDescent()
getMaxHeight
public double getMaxHeight()
getMaxX
public double getMaxX()
getMaxY
public double getMaxY()
getBounds
public java.awt.geom.Rectangle2D getBounds(int index)
getMetric
public java.awt.font.LineMetrics getMetric(int index)
getIterator
public java.text.AttributedCharacterIterator getIterator(int i)
Copyright 2003-2009 JCaptcha. All Rights Reserved.