|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.StringBounds
StringBounds implements a simple string bounds computation tool that fixes a frustrating bug in at least some Java2D implementations. The bug causes Java2D to fail to compute string bounds when the font size is too small. This tool fixes the problem by normalizing the font size during the bounds computation, and by scaling the resulting bounding box down again.
Font.getStringBounds(char[], int, int, java.awt.font.FontRenderContext)| Constructor Summary | |
StringBounds(java.awt.Font font)
Creates a new string bounds computer for the given font. |
|
| Method Summary | |
java.awt.geom.Rectangle2D |
getBounds(java.lang.String string)
Computes the given string bounds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringBounds(java.awt.Font font)
| Method Detail |
public java.awt.geom.Rectangle2D getBounds(java.lang.String string)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||