private LineStyle[] ReadLineStyleArray(SWFDataTypeReader shapeReader, Tag format) { int lineCount = shapeReader.ReadUI8(); if (lineCount == 0xFF) { lineCount = shapeReader.ReadUI16(); } LineStyle[] lineStyles = new LineStyle[lineCount]; if (format == Tag.DefineShape4) { for (int i = 0; i < lineCount; i++) { lineStyles[i] = this.ReadLineStyle2(shapeReader, format); } } else { for (int i = 0; i < lineCount; i++) { lineStyles[i] = this.ReadLineStyle(shapeReader, format); } } return lineStyles; }
private LineStyle ReadLineStyle(SWFDataTypeReader shapeReader, Tag format) { LineStyle ls = new LineStyle(); ls.Width = shapeReader.ReadUI16(); if (format == Tag.DefineShape || format == Tag.DefineShape2) { ls.Colour = shapeReader.ReadRGB(); } else if (format == Tag.DefineShape3 || format == Tag.DefineShape4) { ls.Colour = shapeReader.ReadRGBA(); } else { throw new SWFModellerException(SWFModellerError.Internal, "Can't line style in shape format " + format.ToString()); } return ls; }