1

I am wanting to write a string to a GraphicsPath object in c# like below

'
   path = new GraphicsPath();
   path.AddString("Hello World", FontFamily.GenericSansSerif, 1, 80, new Point(0, 0), StringFormat.GenericDefault);

'

But I then want to take the generated path and write it to a 3d file in this case Sketchup.

Do not worry about sketchup, I just need to work out the meaning of the path.PathTypes which are a byte[] but there is no meaning for it in the documentation at

https://learn.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.pathdata.types?view=netframework-4.8#System_Drawing_Drawing2D_PathData_Types

The documentation states the following rather useless descripion

An array of bytes that specify the types of the corresponding points in the path.

But there is no description of the byte or bit meanings.

Does anyone know the real breakdown of each byte?

enter image description here

When I render the data points without any interpretation of the meaning of the bytes in the PathTypes variable I get the following.

enter image description here

Chris Crowe
  • 333
  • 1
  • 9
  • Here's the documentation: https://learn.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.pathpointtype?view=netframework-4.8 – Peter Schneider Sep 16 '19 at 07:17
  • Thanks - I should have found i myself. Cheers – Chris Crowe Sep 16 '19 at 07:49
  • They are flags regarding the point. https://learn.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.graphicspath.pathtypes?view=dotnet-plat-ext-5.0 I believe this documentation was added after you posted the question, as it's marked relevant to .Net 5.0, but I'm seeing the same values in 4.8. – RJPisscat Jan 19 '21 at 22:03

0 Answers0