g.setStroke(new BasicStroke((float)(2.0f)));\r
g.scale(scale, scale);\r
g.translate(x, y);\r
- g.draw(expandBoundsUnscaled(alignBounds(getTextBounds())));\r
+ g.draw(expandBoundsUnscaled(getTightAlignedBoundsInLocal(tempBounds.get(), g.getFontRenderContext())));\r
g.translate(-x, -y);\r
g.scale(scaleRecip, scaleRecip);\r
g.setColor(oldColor);\r
\r
g.transform(transform);\r
\r
- Rectangle2D bounds = expandBounds( alignBounds( getTightUnalignedBoundsInLocal( tempBounds.get() ) ) );\r
+ Rectangle2D bounds = expandBounds( getTightAlignedBoundsInLocal( tempBounds.get() ) );\r
\r
Path2D path = new Path2D.Double();\r
// LEFT TOP\r
\r
}\r
\r
- /**\r
- * Method for altering colors\r
- * @param c\r
- * @param r\r
- * @param g\r
- * @param b\r
- * @return\r
- */\r
- private Color add(Color c, int r, int g, int b) {\r
- int nr = c.getRed() + r;\r
- int ng = c.getGreen() + g;\r
- int nb = c.getBlue() + b;\r
- if(nr > 255) nr = 255;\r
- if(ng > 255) ng = 255;\r
- if(nb > 255) nb = 255;\r
- return new Color(nr,ng,nb);\r
- }\r
- \r
}\r