private MorphLineStyle ReadMorphLineStyle2(SWFDataTypeReader shapeReader)
{
int startwidth = shapeReader.ReadUI16();
int endwidth = shapeReader.ReadUI16();
CapStyle startCap = (CapStyle)shapeReader.ReadUBits(2);
JoinStyle join = (JoinStyle)shapeReader.ReadUBits(2);
bool hasFill = shapeReader.ReadBit();
bool noHScaling = shapeReader.ReadBit();
bool noVScaling = shapeReader.ReadBit();
bool hasPixelHints = shapeReader.ReadBit();
shapeReader.ReadUBits(5); // Reserved: 0
bool noClose = shapeReader.ReadBit();
CapStyle endCap = (CapStyle)shapeReader.ReadUBits(2);
int? miterLimit = null;
if (join == JoinStyle.Miter)
{
miterLimit = shapeReader.ReadUI16();
}
Color? startColour = null;
Color? endColour = null;
MorphFillStyle fs = null;
if (hasFill)
{
fs = this.ReadMorphFillStyle(shapeReader);
}
else
{
startColour = shapeReader.ReadRGBA();
endColour = shapeReader.ReadRGBA();
}
return new MorphLineStyle()
{
StartWidth = startwidth,
EndWidth = endwidth,
StartColour = startColour,
EndColour = endColour,
StartCap = startCap,
EndCap = endCap,
Join = join,
HasFill = hasFill,
NoHScaling = noHScaling,
NoVScaling = noVScaling,
HasPixelHints = hasPixelHints,
FillStyle = fs,
MiterLimit = miterLimit
};
}