public static GraphicsPath GetPathFromGraph(IGraph graph) { GraphicsPath path1 = new GraphicsPath(); if (graph is ItopVector.Core.Figure.Group) { SvgElementCollection.ISvgElementEnumerator enumerator1 = ((ItopVector.Core.Figure.Group)graph).GraphList.GetEnumerator(); while (enumerator1.MoveNext()) { SvgElement element1 = (SvgElement)enumerator1.Current; if (element1 is IGraph) { GraphicsPath path2 = PathFunc.GetPathFromGraph((IGraph)element1); if (path2.PointCount > 0) { path1.StartFigure(); path1.AddPath(path2, false); } } } return(path1); } path1 = (GraphicsPath)graph.GPath.Clone(); path1.Transform(graph.Transform.Matrix); return(path1); }
public static GraphicsPath PathDataParse(string text) { PointInfoCollection collection1 = new PointInfoCollection(); return(PathFunc.PathDataParse(text, collection1)); }
public static GraphicsPath PathDataParse(string text, PointInfoCollection pointsInfo) { PathFunc.startinfo = null; int num1 = -1; pointsInfo.Clear(); GraphicsPath path1 = new GraphicsPath(); GraphicsPathIterator iterator1 = new GraphicsPathIterator(path1); PointF tf1 = PointF.Empty; string text1 = ""; int nLength = text.Length; Regex regex1 = new Regex("[A-DF-Za-df-z][^A-DF-Za-df-z]*"); PointF tf2 = PointF.Empty; Match match1 = regex1.Match(text); int num2 = 0; //StringBuilder text2 = new StringBuilder(); //string text3 = text; PointF tf3 = PointF.Empty; PointF tf4 = PointF.Empty; PointInfo info1 = null; StringBuilder text4 = new StringBuilder(text); while (match1.Success) { float single1; float single2; float single3; float single4; float single5; float single6; ExtendedGraphicsPath path2; int num3 = match1.Index; text4.Remove(0, text1.Length); // text4 =new StringBuilder(text3.Substring(num3, text3.Length - match1.Index)); if (info1 != null) { //info1.NextString =match1.Value.Trim();// text4.ToString();//match1.Value.Trim(); } text1 = match1.Value.Trim(); char ch1 = (char)text1.ToCharArray(0, 1).GetValue(0); float[] singleArray1 = PathFunc.GetCoords(text1); PointInfo info2 = null; char ch2 = ch1; if (ch2 <= 'Z') { if (ch2 <= 'H') { switch (ch2) { case 'A': { path2 = new ExtendedGraphicsPath(path1); if (singleArray1.Length != 7) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } isArc = true; path2.AddArc(tf2, new PointF(singleArray1[5], singleArray1[6]), singleArray1[0], singleArray1[1], (singleArray1[3] != 0f) && true, (singleArray1[4] != 0f) && true, singleArray1[2]); goto Label_092D; } case 'B': { goto Label_0FEB; } case 'C': { PointF pf1 = tf2; int num10 = 0; if (singleArray1.Length < 6) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } drawArc: path1.AddBezier(pf1.X, pf1.Y, singleArray1[num10], singleArray1[num10 + 1], singleArray1[num10 + 2], singleArray1[num10 + 3], singleArray1[num10 + 4], singleArray1[num10 + 5]); pf1 = new PointF(singleArray1[num10 + 4], singleArray1[num10 + 5]); if ((num10 + 6) < singleArray1.Length) { // info2 = new PointInfo(new PointF(singleArray1[num10+4], singleArray1[num10+5]), new PointF(singleArray1[num10+0], singleArray1[num10+1]), new PointF(singleArray1[num10+2], singleArray1[num10+3]), text1); // info2.Command="C"; // pointsInfo.Add(info2); num10 += 6; goto drawArc; } if (num10 > 0) { tf1 = new PointF(singleArray1[num10 + 2], singleArray1[num10 + 3]); tf2 = new PointF(singleArray1[num10 + 4], singleArray1[num10 + 5]); info2 = new PointInfo(new PointF(singleArray1[num10 + 4], singleArray1[num10 + 5]), new PointF(singleArray1[num10 + 0], singleArray1[num10 + 1]), new PointF(singleArray1[num10 + 2], singleArray1[num10 + 3]), text1); info2.Command = "C"; goto Label_1001; } goto Label_0872; } case 'H': { goto Label_033D; } } goto Label_0FEB; } switch (ch2) { case 'L': { // if (singleArray1.Length != 2) // { // throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); // } //path1.AddLine(tf2, new PointF(singleArray1[0], singleArray1[1])); PointF[] ptfs = new PointF[singleArray1.Length / 2 + 1]; ptfs[0] = tf2; int index1 = 0; for (int i = 1; i < singleArray1.Length; i++) { index1++; ptfs[index1] = new PointF(singleArray1[i - 1], singleArray1[i]); i++; } path1.AddLines(ptfs); info2 = new PointInfo(new PointF(singleArray1[0], singleArray1[1]), text1); goto Label_02B5; } case 'M': { path1.StartFigure(); if (singleArray1.Length != 2) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } tf2 = new PointF(singleArray1[0], singleArray1[1]); info2 = new PointInfo(tf2, text1); info2.IsStart = true; isArc = false; PathFunc.startinfo = info2; //info2.PreString = text1;//text2.ToString(); goto Label_0205; } case 'N': case 'O': case 'P': case 'R': case 'U': { goto Label_0FEB; } case 'Q': { single1 = tf2.X + (((singleArray1[0] - tf2.X) * 2f) / 3f); single2 = tf2.Y + (((singleArray1[1] - tf2.Y) * 2f) / 3f); single3 = singleArray1[0] + ((singleArray1[2] - singleArray1[0]) / 3f); single4 = singleArray1[1] + ((singleArray1[3] - singleArray1[1]) / 3f); if (singleArray1.Length != 4) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddBezier(tf2.X, tf2.Y, single1, single2, single3, single4, singleArray1[2], singleArray1[3]); goto Label_0579; } case 'S': { if (singleArray1.Length != 4) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } if (!tf1.IsEmpty) { goto Label_0755; } path1.AddBezier(tf2.X, tf2.Y, tf2.X, tf2.Y, singleArray1[0], singleArray1[1], singleArray1[2], singleArray1[3]); pointsInfo.Add(new PointInfo(new PointF(singleArray1[2], singleArray1[3]), tf2, new PointF(singleArray1[0], singleArray1[1]), text1)); goto Label_07C4; } case 'T': { if (!tf1.IsEmpty) { goto Label_05D2; } single5 = tf2.X; single6 = tf2.Y; goto Label_0600; } case 'V': { if (singleArray1.Length != 1) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddLine(tf2, new PointF(tf2.X, singleArray1[0])); goto Label_0439; } case 'Z': { goto Label_0F72; } } goto Label_0FEB; } if (ch2 <= 'h') { switch (ch2) { case 'a': { path2 = new ExtendedGraphicsPath(path1); if (singleArray1.Length != 7) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path2.AddArc(tf2, new PointF(singleArray1[5] + tf2.X, singleArray1[6] + tf2.Y), singleArray1[0], singleArray1[1], (singleArray1[3] != 0f) && true, (singleArray1[4] != 0f) && true, singleArray1[2]); goto Label_09F7; } case 'b': { goto Label_0FEB; } case 'c': { if (singleArray1.Length != 6) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("unnabeparsepath") + text1); } path1.AddBezier(tf2.X, tf2.Y, (float)(singleArray1[0] + tf2.X), (float)(singleArray1[1] + tf2.Y), (float)(singleArray1[2] + tf2.X), (float)(singleArray1[3] + tf2.Y), (float)(singleArray1[4] + tf2.X), (float)(singleArray1[5] + tf2.Y)); goto Label_0EF0; } case 'h': { goto Label_0397; } } goto Label_0FEB; } switch (ch2) { case 'l': { if (singleArray1.Length != 2) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddLine(tf2, new PointF(singleArray1[0] + tf2.X, singleArray1[1] + tf2.Y)); goto Label_030E; } case 'm': { path1.StartFigure(); if (singleArray1.Length != 2) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } tf2 = new PointF(singleArray1[0], singleArray1[1]); info2 = new PointInfo(tf2, text1); info2.IsStart = true; isArc = false; PathFunc.startinfo = info2; goto Label_025F; } case 'n': case 'o': case 'p': case 'r': case 'u': { goto Label_0FEB; } case 'q': { single1 = tf2.X + ((singleArray1[0] * 2f) / 3f); single2 = tf2.Y + ((singleArray1[1] * 2f) / 3f); single3 = (singleArray1[0] + tf2.X) + ((singleArray1[2] - singleArray1[0]) / 3f); single4 = (singleArray1[1] + tf2.Y) + ((singleArray1[3] - singleArray1[1]) / 3f); if (singleArray1.Length != 4) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddBezier(tf2.X, tf2.Y, single1, single2, single3, single4, (float)(singleArray1[2] + tf2.X), (float)(singleArray1[3] + tf2.Y)); goto Label_0B0D; } case 's': { if (singleArray1.Length != 4) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } if (!tf1.IsEmpty) { goto Label_0D63; } path1.AddBezier(tf2.X, tf2.Y, tf2.X, tf2.Y, (float)(singleArray1[0] + tf2.X), (float)(singleArray1[1] + tf2.Y), (float)(singleArray1[2] + tf2.X), (float)(singleArray1[3] + tf2.Y)); goto Label_0DF2; } case 't': { if (!tf1.IsEmpty) { goto Label_0B98; } single5 = tf2.X; single6 = tf2.Y; goto Label_0BC6; } case 'v': { if (singleArray1.Length != 1) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddLine(tf2, new PointF(tf2.X, singleArray1[0] + tf2.Y)); goto Label_049B; } case 'z': { goto Label_0F72; } default: { goto Label_0FEB; } } Label_0205: //M num2++; goto Label_1001; Label_025F: num2++; goto Label_1001; Label_02B5: tf2 = new PointF(singleArray1[0], singleArray1[1]); goto Label_1001; Label_030E: tf2 = new PointF(singleArray1[0] + tf2.X, singleArray1[1] + tf2.Y); info2 = new PointInfo(tf2, text1); goto Label_1001; Label_033D: if (singleArray1.Length == 1) { path1.AddLine(tf2, new PointF(singleArray1[0], tf2.Y)); } else { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } tf2 = new PointF(singleArray1[0], tf2.Y); info2 = new PointInfo(tf2, text1); goto Label_1001; Label_0397: if (singleArray1.Length == 1) { path1.AddLine(tf2, new PointF(singleArray1[0] + tf2.X, tf2.Y)); } else { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } tf2 = new PointF(singleArray1[0] + tf2.X, tf2.Y); info2 = new PointInfo(tf2, text1); goto Label_1001; Label_0439: tf2 = new PointF(tf2.X, singleArray1[0]); info2 = new PointInfo(tf2, text1); goto Label_1001; Label_049B: tf2 = new PointF(tf2.X, singleArray1[0] + tf2.Y); info2 = new PointInfo(tf2, text1); goto Label_1001; Label_0579: tf1 = new PointF(single3, single4); tf2 = new PointF(singleArray1[2], singleArray1[3]); info2 = new PointInfo(tf2, new PointF(single1, single2), new PointF(single3, single4), text1); goto Label_1001; Label_05D2: single5 = (2f * tf2.X) - tf1.X; single6 = (2f * tf2.Y) - tf1.Y; Label_0600: single1 = tf2.X + (((single5 - tf2.X) * 2f) / 3f); single2 = tf2.Y + (((single6 - tf2.Y) * 2f) / 3f); single3 = single5 + ((singleArray1[0] - single5) / 3f); single4 = single6 + ((singleArray1[1] - single6) / 3f); if (singleArray1.Length != 2) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddBezier(tf2.X, tf2.Y, single1, single2, single3, single4, singleArray1[0], singleArray1[1]); tf1 = new PointF(single3, single4); tf2 = new PointF(singleArray1[0], singleArray1[1]); info2 = new PointInfo(tf2, new PointF(single1, single2), new PointF(single3, single4), text1); goto Label_1001; Label_0755: single1 = (2f * tf2.X) - tf1.X; single2 = (2f * tf2.Y) - tf1.Y; path1.AddBezier(tf2.X, tf2.Y, single1, single2, singleArray1[0], singleArray1[1], singleArray1[2], singleArray1[3]); Label_07C4: tf1 = new PointF(singleArray1[0], singleArray1[1]); tf2 = new PointF(singleArray1[2], singleArray1[3]); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0872: tf1 = new PointF(singleArray1[2], singleArray1[3]); tf2 = new PointF(singleArray1[4], singleArray1[5]); info2 = new PointInfo(new PointF(singleArray1[4], singleArray1[5]), new PointF(singleArray1[0], singleArray1[1]), new PointF(singleArray1[2], singleArray1[3]), text1); goto Label_1001; Label_092D: //A tf1 = PointF.Empty; tf2 = path1.GetLastPoint(); //, path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2] info2 = new PointInfo(tf2, PointF.Empty, new PointF(tf2.X + singleArray1[0], tf2.Y), text1); info2.NextControl = new PointF(tf2.X, tf2.Y + singleArray1[1]); info2.Rx = singleArray1[0]; info2.Ry = singleArray1[1]; info2.Angle = singleArray1[2]; info2.LargeArcFlage = (int)singleArray1[3]; info2.SweepFlage = (int)singleArray1[4]; goto Label_1001; Label_09F7: tf1 = PointF.Empty; tf2 = path1.GetLastPoint(); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0B0D: tf1 = new PointF(single3, single4); tf2 = new PointF(singleArray1[2] + tf2.X, tf2.Y + singleArray1[3]); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0B98: single5 = (2f * tf2.X) - tf1.X; single6 = (2f * tf2.Y) - tf1.Y; Label_0BC6: single1 = tf2.X + (((single5 - tf2.X) * 2f) / 3f); single2 = tf2.Y + (((single6 - tf2.Y) * 2f) / 3f); single3 = single5 + (((singleArray1[0] + tf2.X) - single5) / 3f); single4 = single6 + (((singleArray1[1] + tf2.Y) - single6) / 3f); if (singleArray1.Length != 2) { throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("invalidpathformat") + text1); } path1.AddBezier(tf2.X, tf2.Y, single1, single2, single3, single4, (float)(singleArray1[0] + tf2.X), (float)(singleArray1[1] + tf2.Y)); tf1 = new PointF(single3, single4); tf2 = new PointF(singleArray1[0] + tf2.X, tf2.Y + singleArray1[1]); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0D63: single1 = (2f * tf2.X) - tf1.X; single2 = (2f * tf2.Y) - tf1.Y; path1.AddBezier(tf2.X, tf2.Y, single1, single2, (float)(singleArray1[0] + tf2.X), (float)(singleArray1[1] + tf2.Y), (float)(singleArray1[2] + tf2.X), (float)(singleArray1[3] + tf2.Y)); Label_0DF2: tf1 = new PointF(singleArray1[0] + tf2.X, tf2.Y + singleArray1[1]); tf2 = new PointF(singleArray1[2] + tf2.X, tf2.Y + singleArray1[3]); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0EF0: tf1 = new PointF(singleArray1[2] + tf2.X, tf2.Y + singleArray1[3]); tf2 = new PointF(singleArray1[4] + tf2.X, tf2.Y + singleArray1[5]); info2 = new PointInfo(path1.GetLastPoint(), path1.PathPoints[path1.PointCount - 3], path1.PathPoints[path1.PointCount - 2], text1); goto Label_1001; Label_0F72: //Z path1.CloseFigure(); if (pointsInfo.Count > 0) { PointInfo info3 = pointsInfo[pointsInfo.Count - 1]; if ((PathFunc.startinfo != null) && (info3 != PathFunc.startinfo)) { PathFunc.startinfo.PreInfo = info3; info3.NextInfo = PathFunc.startinfo; if (!isArc) { PathFunc.startinfo.SecondControl = info3.SecondControl; } // info3.NextControl = PathFunc.startinfo.NextControl; info3.IsEnd = true; } } num2++; goto Label_1001; Label_0FEB: //error throw new Exception(ItopVector.Core.Config.Config.GetLabelForName("unnabeparsepath") + text); Label_1001: if (info2 != null) { info2.Command = ch1.ToString(); pointsInfo.Add(info2); //info2.PreString = text1;//text2.ToString(); info2.SubPath = num2; info2.Index = num3; } info1 = info2; //text2.Append(match1.Value); match1 = match1.NextMatch(); num1++; } return(path1); }
public static string[] Linear(string startvalue, float starttime, string endvalue, float endtime, DomType domtype, int time) { int num2; int num5; char[] chArray1 = new char[2] { ' ', ',' }; string[] textArray1 = startvalue.Split(chArray1); char[] chArray2 = new char[2] { ' ', ',' }; string[] textArray2 = endvalue.Split(chArray2); string[] textArray3 = new string[Math.Min(textArray1.Length, textArray2.Length)]; switch (domtype) { case DomType.SvgMatrix: case DomType.SvgNumber: { num2 = 0; goto Label_0217; } case DomType.SvgString: { goto Label_0762; } case DomType.SvgColor: { if ((!startvalue.Trim().StartsWith("url") && !endvalue.Trim().StartsWith("url")) && ((endvalue != "none") && (startvalue != "none"))) { Color color1 = ColorFunc.ParseColor(startvalue.Trim()); Color color2 = ColorFunc.ParseColor(endvalue.Trim()); float single5 = (float)Math.Round((double)AnimFunc.Linear((float)color1.R, starttime, (float)color2.R, endtime, (float)time), 2); float single6 = (float)Math.Round((double)AnimFunc.Linear((float)color1.G, starttime, (float)color2.G, endtime, (float)time), 2); float single7 = (float)Math.Round((double)AnimFunc.Linear((float)color1.B, starttime, (float)color2.B, endtime, (float)time), 2); string[] textArray11 = new string[1]; string[] textArray12 = new string[7] { "rgb(", single5.ToString(), ",", single6.ToString(), ",", single7.ToString(), ")" }; textArray11[0] = string.Concat(textArray12); return(textArray11); } if (time < ((starttime / 2f) + (endtime / 2f))) { return(new string[1] { startvalue }); } return(new string[1] { endvalue }); } case DomType.SvgPath: { PointInfoCollection collection1 = new PointInfoCollection(); PointInfoCollection collection2 = new PointInfoCollection(); GraphicsPath path1 = PathFunc.PathDataParse(startvalue, collection1); GraphicsPath path2 = PathFunc.PathDataParse(endvalue, collection2); if (collection1.Count == collection2.Count) { string text4 = string.Empty; for (int num3 = 0; num3 < collection1.Count; num3++) { PointInfo info1 = collection1[num3]; PointInfo info2 = collection2[num3]; if (((info1.Command.Trim().ToLower() != info2.Command.Trim().ToLower()) || (info1.IsStart != info2.IsStart)) || (info1.IsEnd != info2.IsEnd)) { if ((time > ((starttime + endtime) / 2f)) && (time <= endtime)) { return(new string[1] { endvalue }); } if ((time <= ((starttime + endtime) / 2f)) && (time >= starttime)) { return(new string[1] { startvalue }); } return(new string[1] { string.Empty }); } text4 = text4 + info1.Command.Trim().ToUpper(); string text5 = info1.Command.Trim().ToUpper(); if (((text5 == "C") || (text5 == "Q")) || (((text5 == "A") || (text5 == "T")) || (text5 == "S"))) { float single8 = AnimFunc.Linear(info1.FirstControl.X, starttime, info2.FirstControl.X, endtime, (float)time); float single9 = AnimFunc.Linear(info1.FirstControl.Y, starttime, info2.FirstControl.Y, endtime, (float)time); string text8 = text4; string[] textArray19 = new string[5] { text8, single8.ToString(), " ", single9.ToString(), " " }; text4 = string.Concat(textArray19); single8 = AnimFunc.Linear(info1.SecondControl.X, starttime, info2.SecondControl.X, endtime, (float)time); single9 = AnimFunc.Linear(info1.SecondControl.Y, starttime, info2.SecondControl.Y, endtime, (float)time); string text9 = text4; string[] textArray20 = new string[5] { text9, single8.ToString(), " ", single9.ToString(), " " }; text4 = string.Concat(textArray20); } float single10 = AnimFunc.Linear(info1.MiddlePoint.X, starttime, info2.MiddlePoint.X, endtime, (float)time); float single11 = AnimFunc.Linear(info1.MiddlePoint.Y, starttime, info2.MiddlePoint.Y, endtime, (float)time); string text10 = text4; string[] textArray21 = new string[5] { text10, single10.ToString(), " ", single11.ToString(), " " }; text4 = string.Concat(textArray21); if (info1.IsEnd) { text4 = text4 + "Z"; } } return(new string[1] { text4 }); } if ((time > ((starttime + endtime) / 2f)) && (time <= endtime)) { return(new string[1] { endvalue }); } if ((time <= ((starttime + endtime) / 2f)) && (time >= starttime)) { return(new string[1] { startvalue }); } return(new string[1] { string.Empty }); } case DomType.SvgPoints: { PointF[] tfArray1 = PointsFunc.PointsParse(startvalue); PointF[] tfArray2 = PointsFunc.PointsParse(endvalue); if (tfArray1.Length == tfArray2.Length) { string text1 = string.Empty; for (int num1 = 0; num1 < tfArray1.Length; num1++) { PointF tf1 = tfArray1[num1]; PointF tf2 = tfArray2[num1]; float single1 = AnimFunc.Linear(tf1.X, starttime, tf2.X, endtime, (float)time); float single2 = AnimFunc.Linear(tf1.Y, starttime, tf2.Y, endtime, (float)time); text1 = text1 + single1.ToString() + " " + single2.ToString(); if (num1 < (tfArray1.Length - 1)) { text1 = text1 + ","; } } return(new string[1] { text1 }); } if ((time > ((starttime + endtime) / 2f)) && (time <= endtime)) { return(new string[1] { endvalue }); } if ((time <= ((starttime + endtime) / 2f)) && (time >= starttime)) { return(new string[1] { startvalue }); } return(new string[1] { string.Empty }); } default: { goto Label_0762; } } Label_0217: if (num2 >= textArray3.Length) { return(textArray3); } string text2 = textArray1[num2]; string text3 = textArray2[num2]; float single3 = 0f; float single4 = 0f; try { single3 = ItopVector.Core.Func.Number.ParseFloatStr(text2); single4 = ItopVector.Core.Func.Number.ParseFloatStr(text3); double num6 = Math.Round((double)AnimFunc.Linear(single3, starttime, single4, endtime, (float)time), 2); textArray3[num2] = num6.ToString(); } catch (Exception) { } num2++; goto Label_0217; Label_0762: num5 = 0; while (num5 < textArray3.Length) { string text6 = textArray1[num5]; string text7 = textArray2[num5]; if (time >= ((endtime / 2f) + (starttime / 2f))) { textArray3[num5] = text7; } else if (time >= starttime) { textArray3[num5] = text6; } else { textArray3[num5] = string.Empty; } num5++; } return(textArray3); }