graphics.rotate(Math.toRadians(textRot));\r
graphics.translate(-cx, -cy);\r
}\r
-\r
+ \r
// first dry-run to calculate the total height of the text\r
- double textHeight = getTextHeight(graphics);\r
+ double textHeight;\r
\r
switch (s.getVerticalAlignment()){\r
default:\r
y += insets.top;\r
break;\r
case BOTTOM:\r
+ textHeight = getTextHeight(graphics);\r
y += anchor.getHeight() - textHeight - insets.bottom;\r
break;\r
case MIDDLE:\r
+ textHeight = getTextHeight(graphics);\r
double delta = anchor.getHeight() - textHeight - insets.top - insets.bottom;\r
y += insets.top + delta/2;\r
break;\r