locked
Drawing text along a path RRS feed

  • Question

  • User132352790 posted

    Does anyone have a snippet showing how to make a rendered text follow a GraphicsPath ? (C# or VB.NET is preferred). I should be able to draw text the follow curves, corners etc.

    Any general ideas on how it probably could be accomplished are also appreciated.

    Wednesday, March 15, 2006 3:33 AM

All replies

  • User2128074059 posted
    Can you tell me more details.
    Wednesday, March 22, 2006 5:14 AM
  • User132352790 posted

    Think of city maps...

    In maps you have roads the wind, bend and turn. Lets say you want to write the road-name on this bending, turning and winding road, so that the text follows the road.

    In that case I would have transformed my street into a GraphicsPath that I can render to a bitmap using GDI+. Now I will use this GraphicsPath as the basis of placing the text on the road so that the text accurately follows the GraphicsPath.

    At the moment all I know how to do is finding the center of the path, calculate the orientation at this point, and then rotate the entire text to this angle, but this only works for fairly straight lines.

    Wednesday, March 22, 2006 11:34 AM
  • User483472087 posted

    Did you ever get this to work? I'm dealing with a similary "problem."

     

    http://forums.asp.net/p/972183/1234242.aspx#1234242 

     

    Chet

    Monday, August 18, 2008 10:26 AM
  • User132352790 posted

     Nope.

    Monday, August 18, 2008 4:28 PM
  • User466926429 posted

    Check out the following...

    http://www.codeproject.com/KB/GDI-plus/Text_on_Path_with_VBNET.aspx

    Thursday, September 25, 2008 3:56 PM