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(); }
protected override void OnGLRender(object sender, EventArgs args) { GL.Clear(ClearBufferMask.ColorBufferBit); canvas2d.SmoothMode = CanvasSmoothMode.AggSmooth; canvas2d.FillCircle(PixelFarm.Drawing.Color.OrangeRed, 100, 400, 25); var color = PixelFarm.Drawing.Color.OrangeRed; canvas2d.FillEllipse( new PixelFarm.Drawing.Color( 100, color.R, color.G, color.B), 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(); }
protected override void OnGLRender(object sender, EventArgs args) { GL.Clear(ClearBufferMask.ColorBufferBit); canvas2d.SmoothMode = CanvasSmoothMode.AggSmooth; canvas2d.FillCircle(PixelFarm.Drawing.Color.OrangeRed, 100, 400, 25); var color = PixelFarm.Drawing.Color.OrangeRed; canvas2d.FillEllipse( new PixelFarm.Drawing.Color( 100, color.R, color.G, color.B), 200, 400, 25, 50); ////-------------------------------------------- miniGLControl.SwapBuffers(); }