private ILineStyle readLineStyle(TagType tagType) throws MalformedTagException
{
ILineStyle result = null;
if (tagType == TagType.DefineShape4)
{
final LineStyle2 s = new LineStyle2();
s.setWidth(bitStream.readUI16());
s.setStartCapStyle(bitStream.readUB(2));
s.setJoinStyle(bitStream.readUB(2));
s.setHasFillFlag(bitStream.readBit());
s.setNoHScaleFlag(bitStream.readBit());
s.setNoVScaleFlag(bitStream.readBit());
s.setPixelHintingFlag(bitStream.readBit());
bitStream.readUB(5);
s.setNoClose(bitStream.readBit());
s.setEndCapStyle(bitStream.readUB(2));
if (s.getJoinStyle() == LineStyle2.JS_MITER_JOIN)
{
s.setMiterLimitFactor(bitStream.readUI16()); // 8.8 fixed point
}
if (s.isHasFillFlag())
{
IFillStyle fillStyle = readFillStyle(tagType);
s.setFillType((FillStyle)fillStyle);
// Default to #00000000 when there's no color,
// to match behavior of old SWF reader
s.setColor(new RGBA(0, 0, 0, 0));
}
else
{
s.setColor(readRGBA());
}
result = s;
}
else if (tagType == TagType.DefineMorphShape)
{