protected override void OnGLRender(object sender, EventArgs args) { GL.Clear(ClearBufferMask.ColorBufferBit); canvas2d.StrokeColor = PixelFarm.Drawing.Color.Blue; //line canvas2d.DrawLine(50, 50, 200, 200); //-------------------------------------------- //rect canvas2d.DrawRect(2.5f, 1.5f, 50, 50); canvas2d.FillRect(PixelFarm.Drawing.Color.Green, 50, 50, 50, 50); //-------------------------------------------- //circle & ellipse canvas2d.DrawCircle(100, 100, 25); canvas2d.DrawEllipse(200, 200, 25, 50); canvas2d.FillCircle(PixelFarm.Drawing.Color.OrangeRed, 100, 400, 25); canvas2d.FillEllipse(PixelFarm.Drawing.Color.OrangeRed, 200, 400, 25, 50); //-------------------------------------------- //polygon float[] polygon1 = new float[] { 50, 200, 250, 200, 125, 350 }; canvas2d.DrawPolygon(polygon1, 3); float[] polygon2 = new float[] { 250, 400, 450, 400, 325, 550 }; canvas2d.FillPolygon(PixelFarm.Drawing.Color.Green, polygon2); //-------------------------------------------- miniGLControl.SwapBuffers(); }