예제 #1
0
        private static void DrawPost(System.Drawing.Graphics g, PointF center, float size)
        {
            var point = center.FromTableCenter();

            size *= 2.0f;

            g.FillEllipse(Brushes.Green, point.X - size / 2.0f, point.Y - size / 2.0f, size, size);
        }
예제 #2
0
        private static void DrawWall(System.Drawing.Graphics g, PointF startingPoint, float size, float length, float rotation)
        {
            var point = startingPoint.FromTableCenter();

            length *= 2.12f;
            size   *= 0.28f;

            g.TranslateTransform(point.X, point.Y);
            g.RotateTransform(-rotation);
            g.FillRectangle(Brushes.DarkBlue, -size / 2.0f, -length, size, length);
            g.ResetTransform();
        }
예제 #3
0
        private static void DrawLines(System.Drawing.Graphics g, PointF startingPoint, float rotation, IList <Node> lines)
        {
            var point = startingPoint.FromTableCenter();

            foreach (var line in lines)
            {
                g.TranslateTransform(point.X, point.Y);
                g.RotateTransform(-rotation);

                DrawLine(g, line.Position.ToPointF(), (float)line.Scale.X, (float)line.Scale.Z, (float)line.Rotation.Y);

                g.ResetTransform();
            }
        }