Graphics2D g2d,
int decorationType) {
Paint prevPaint = null;
Paint prevStrokePaint = null;
Stroke prevStroke = null;
Rectangle2D decorationRect = null;
for (int i = 0; i < textRuns.size(); i++) {
TextRun textRun = (TextRun)textRuns.get(i);
AttributedCharacterIterator runaci = textRun.getACI();
runaci.first();
Composite opacity = (Composite)
runaci.getAttribute(GVTAttributedCharacterIterator.
TextAttribute.OPACITY);
if (opacity != null) {
g2d.setComposite(opacity);
}
Paint paint = null;
Stroke stroke = null;
Paint strokePaint = null;
switch (decorationType) {
case TextSpanLayout.DECORATION_UNDERLINE :
paint = (Paint) runaci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.UNDERLINE_PAINT);
stroke = (Stroke) runaci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.UNDERLINE_STROKE);