style = DefaultStyle.getInstance();
}
int decoration = ((Integer) style
.getStyleProperty(ICSSPropertyID.ATTR_TEXTDECORATION))
.intValue();
ICSSFont font = style.getCSSFont();
g.setFont(font.getSwtFont());
Color newColor = null;
Object color = style.getColor();
if (color instanceof Color) {
g.setForegroundColor((Color) color);
} else if (color instanceof RGB) {
newColor = new Color(Display.getCurrent(), (RGB) color);
g.setForegroundColor(newColor);
} else {
g.setForegroundColor(ColorConstants.black);
}
Object textAlign = style
.getStyleProperty(ICSSPropertyID.ATTR_TEXTALIGN);
int begin = 0;
int end = 0;
int fontHeight = FigureUtilities.getFontMetrics(font.getSwtFont())
.getHeight();
int fontWidth = FigureUtilities.getFontMetrics(font.getSwtFont())
.getAverageCharWidth();
int columns = (rect.width - HORIZONTAL_PADDING) / fontWidth;
int i = 0;
while (true) {