0

I am programming in C# and using OpenTK (openGL library) to Render 3D. I have a System.Drawing.Drawing2D.GraphicsPath that I need to render in 3D space. So far I was able to render a rough outline like this...

GraphicsPath path = new GraphicsPath();

path.AddString("Test String", FontFamily.Families[8], (int)FontStyle.Regular, 4, new Point(0, 0), StringFormat.GenericDefault);

GL.Begin(PrimitiveType.LineLoop);

PointF[] points = path.PathPoints;

for (int i = 0; i < path.PointCount; i++)
{
      if (path.PathTypes[i] == 0) { GL.End(); GL.Begin(PrimitiveType.LineLoop); }
      GL.Vertex2(points[i].X / 25.0, points[i].Y / -25.0);
}

GL.End();

My question is how do I have the things from the GraphicsPath be filled in and is there a way to render the bezier curve from the GraphicsPath? If so how?

Dennis Ranish
  • 573
  • 1
  • 4
  • 18

0 Answers0