Пример #1
0
            /// <summary>
            /// Draw a point in the current figure
            /// </summary>
            /// <param name="x">X coordinate</param>
            /// <param name="y">Y coordinate</param>
            /// <param name="z">Z coordinate</param>
            /// <param name="m">M coordinate</param>
            private void AddPoint(double x, double y, double?z, double?m)
            {
                if (z.HasValue && double.IsNaN(z.Value))
                {
                    z = null;
                }

                if (m.HasValue && double.IsNaN(m.Value))
                {
                    m = null;
                }

                if (points == 0)
                {
                    pipeline.BeginFigure(x, y, z, m);
                }
                else
                {
                    pipeline.LineTo(x, y, z, m);
                }

                points += 1;
            }
Пример #2
0
        internal static void DrawLine(TypeWashedPipeline pipeline, PositionData[] line)
        {
            for (int i = 0; i < line.Length; ++i)
            {
                if (i == 0)
                {
                    pipeline.BeginFigure(line[i].X, line[i].Y, line[i].Z, line[i].M);
                }
                else
                {
                    pipeline.LineTo(line[i].X, line[i].Y, line[i].Z, line[i].M);
                }
            }

            pipeline.EndFigure();
        }