Example #1
0
      /// <summary>
      /// Overrides Figure.Show()
      /// Draws a rectangle using openTK and openGL with the attributes 
      /// specified.
      /// </summary>
      public override void Show()
      {
         TRectangle rect = new TRectangle();

         GL.LineWidth(lineWidth);
         GL.Begin(PrimitiveType.LineLoop);
            GL.Color3(FGColor);
            GL.Vertex2(pts[1].X, pts[1].Y);
            GL.Vertex2(pts[0].X, pts[1].Y);
            GL.Vertex2(pts[0].X, pts[0].Y);
            GL.Vertex2(pts[1].X, pts[0].Y);
         GL.End();
      }
Example #2
0
      public override void Show()
      {
         TRectangle rect = new TRectangle();

         GL.Begin(PrimitiveType.Polygon);
         GL.LineWidth(lineWidth);
         GL.Color3(FGColor);

         //TODO: fix points
         GL.Vertex2(pts[pts.Count - 1].X, pts[pts.Count - 1].Y);
         GL.Vertex2(-pts[pts.Count - 1].Y, pts[pts.Count - 1].X);
         GL.Vertex2(-pts[0].Y, pts[0].X);
         GL.Vertex2(pts[0].X, pts[0].Y);
         GL.End();
      }