}
private TextRecord getStyleRecord(FontBuilder fontBuilder, double height,
Color color, int xOffset, int yOffset)
{
TextRecord tr = new TextRecord();
if (fontBuilder != null)
{
tr.setFont(fontBuilder.tag);
tr.setHeight(SwfUtils.toTwips(height));
}
if (color != null)
{
int c = SwfUtils.colorToInt(color);
tr.setColor(c);
}
if (xOffset > 0)
{
tr.setX(xOffset);
}
if (yOffset > 0)
{
tr.setY(yOffset);
}
return tr;
}