Esempio n. 1
0
File: G.cs Progetto: uwx/MadSharp
        public static void DrawPolygon(int[] x, int[] y, int n)
        {
            if (n < 2)
            {
                return;
            }

            var l = n - 1;

            for (var i = 0; i < l; i++)
            {
                D2D.DrawLine(new RawVector2(x[i] - 0.5f, y[i] - 0.5f), new RawVector2(x[i + 1] - 0.5f, y[i + 1] - 0.5f), _currentColor);
            }

            D2D.DrawLine(new RawVector2(x[l] - 0.5f, y[l] - 0.5f), new RawVector2(x[0] - 0.5f, y[0] - 0.5f), _currentColor);
        }
Esempio n. 2
0
File: G.cs Progetto: uwx/MadSharp
 public static void DrawLine(int x1, int y1, int x2, int y2)
 {
     D2D.DrawLine(new RawVector2(x1, y1), new RawVector2(x2, y2), _currentColor);
     //throw new NotImplementedException();
 }