0

May you help me to use GDI+ (in RAD Delphi) to use a command as such: Graphics.DrawString('text',-1,font,MakePoint(x,y),Brush) following a path. In fact, I want to put a string text around a circle following the circus radius. I didn't succeeded to use the method DrawDriveString. I didn't find documentation on this subject for Delphi. Probably you may supply any.

Tom Brunberg
  • 20,312
  • 8
  • 37
  • 54
  • If you understand how to find point on circle with polar coordinate system than it is easy to write the string around that point – Zamrony P. Juhara May 18 '18 at 21:50
  • Delphi can't use GDI's C++ classes, like `Graphics`. You will have to use [GDI+s Flat API](https://msdn.microsoft.com/en-us/library/ms533969.aspx) instead, like the `GdipDrawString()` function. Or, use one of the many 3rd party wrapper libraries that are available for Delphi to wrap GDI+s Flat API in Delphi classes. – Remy Lebeau May 18 '18 at 23:25
  • In any case, GDI+ simply does not support drawing text along a path, only in a straight line. To draw text on a path, you have to flatten the path into segments and then manually draw substrings along each segment as needed. It can be quite involved, and the only code examples I've been able to find are in VB.NET or C# only (see [this](https://www.codeproject.com/Articles/13864/Text-on-Path-with-VB-NET) and [this](https://www.codeproject.com/Articles/8383/Customized-Text-Orientated-Controls-in-C-Part-I-La) and [this](http://csharphelper.com/blog/2016/01/draw-text-on-a-curve-in-c/)). – Remy Lebeau May 18 '18 at 23:43

0 Answers0