public void GetPointsLine() { // 数组扩容2倍 if (pointsLine.length < bufflength) { pointsLine = GeneralTool.enlarge_float(pointsLine, iLastIndex); } if (iLastIndex < 4) { pointsLine[0] = StepTranslate[0]; pointsLine[1] = StepTranslate[1]; pointsLine[2] = StepTranslate[0]; pointsLine[3] = StepTranslate[1]; } else { pointsLine[iLastIndex - 2] = StepTranslate[0]; pointsLine[iLastIndex - 1] = StepTranslate[1]; pointsLine[iLastIndex] = StepTranslate[0]; pointsLine[iLastIndex + 1] = StepTranslate[1]; pointsLine[iLastIndex + 2] = StepTranslate[0]; pointsLine[iLastIndex + 3] = StepTranslate[1]; } iLastIndex = (iLastIndex + 4) % bufflength; }