Here are the examples of the csharp api System.Collections.Generic.List.Add(lineInfo) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
View Source File : gcParser.cs
License : GNU General Public License v3.0
Project Creator : Mmalherbe
License : GNU General Public License v3.0
Project Creator : Mmalherbe
internal void SetCoordsAndMultiLine(List<Coords> coords, bool multiline = false)
{
ResetScales();
Linebuilder.ClearLines();
OriginalCoords = coords;
lineInfoList.Clear();
for (int i = 0; i < OriginalCoords.Count - 1; i += 2)
{
float deltaX = (float)OriginalCoords[i].X - (float)OriginalCoords[i + 1].X;
float deltaY = (float)OriginalCoords[i].Y - (float)OriginalCoords[i + 1].Y;
float a = deltaX / (deltaY > 0 ? deltaY : 1);
float b = ((float)OriginalCoords[i + 1].Y) / a > 0 ? (a * (float)OriginalCoords[i + 1].X) : 1;
lineInfo lineInf = new lineInfo
{
a = a,
b = b
};
lineInfoList.Add(lineInf);
}
}