views:

44

answers:

1

I am trying to write text on the circled image near the edges using .net libraries. Please refer to the following url for image to see what I am trying to achieve (Even I can't do perfectly in paint :( ).

Image Url

I tried Graphics, Bitmap and other relevant classes of .net but they don't have any feature to do it. I am open for any 3rd party components as well.

Thanks in advance and look forward to your thoughts!

+2  A: 

I thought that you could just use GraphicsPath.AddString(), and draw that path using the Graphics object using graphics.DrawPath().

However, I tried it and it didn't work.

Here's a blog post about a chap much cleverer than me who's done it properly (GraphicsPath is still the key, but there's more to it): http://www.planetclegg.com/projects/WarpingTextToSplines.html

Neil Barnwell
Thanks Neil for the pointer. Sounds like exactly what I wanted. // I wish it were this easy, actually need // to create a new path. textPath.PathPoints[i] = new PointF(finalX, finalY); I tried it but didn't work. GraphicsPath doesn't allow to change the PathPoints' values and that's the key. Without it, this solution doesn't seem to be working. Plz check above code, we can't really edit/reassign different values. Any thoughts?
Tanush
The blog post does cover the fact that you can't edit the points, and that you need to create a new path from by manipulating the values from the previous one.
Neil Barnwell