private void encodeMorphLinestyles(MorphLineStyle[] lineStyles, SwfEncoder w, int code) { if (lineStyles.Length >= 0xFF) { w.writeUI8(0xFF); w.writeUI16(lineStyles.Length); } else { w.writeUI8(lineStyles.Length); } for (int i = 0; i < lineStyles.Length; i++) { MorphLineStyle style = lineStyles[i]; w.writeUI16(style.startWidth); w.writeUI16(style.endWidth); if (code == flash.swf.TagValues_Fields.stagDefineMorphShape2) { w.writeUBits(style.startCapsStyle, 2); w.writeUBits(style.jointStyle, 2); w.writeBit(style.hasFill); w.writeBit(style.noHScale); w.writeBit(style.noVScale); w.writeBit(style.pixelHinting); w.writeUBits(0, 5); // reserved w.writeBit(style.noClose); w.writeUBits(style.endCapsStyle, 2); if (style.jointStyle == 2) { w.writeUI16(style.miterLimit); } } if (!style.hasFill) { encodeRGBA(style.startColor, w); encodeRGBA(style.endColor, w); } if (style.hasFill) { encodeMorphFillstyle(style.fillType, w, code); } } }
private void printMorphLineStyles(MorphLineStyle[] lineStyles) { for (int i = 0; i < lineStyles.Length; i++) { MorphLineStyle lineStyle = lineStyles[i]; indent(); out_Renamed.Write("<linestyle "); out_Renamed.Write("startColor='" + printRGBA(lineStyle.startColor) + "' "); out_Renamed.Write("endColor='" + printRGBA(lineStyle.startColor) + "' "); out_Renamed.Write("startWidth='" + lineStyle.startWidth + "' "); out_Renamed.Write("endWidth='" + lineStyle.endWidth + "' "); //UPGRADE_TODO: Method 'java.io.PrintWriter.println' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioPrintWriterprintln_javalangString'" out_Renamed.WriteLine("/>"); } }