From: Josef Garvi Subject: Wrapping Text Inside a Circle Date: 23 Apr 1999 00:00:00 GMT Message-ID: <372036EB.49A2003A@eden-foundation.org> Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Eden Foundation Mime-Version: 1.0 Reply-To: josef@eden-foundation.org Newsgroups: borland.public.delphi.graphics I have developed a function that prints a string inside a circle. The text appears inside the circle, starting from the top and stretching down, wrapping to a new line whenever the width of one line of text reaches the width of the circle at that place (the circle becomes wider, wider, then narrower, narrower). This works all fine, but I would like to enhance myfunction with one more feature: I would like to calculate the size of the circle so that it is big enough to fit all the text, but not so big that it leaves a lot of empty space. What makes this complicated seems to be that the text must be wrapped when there is sacing between the words, and the font I use it variable-width. This means that every small change in diameter of the circle will give cascaded effects on the text, since the words will wrap at new locations. Does anyone have suggestions on how this could be achieved? (apart from looping through every possible size of the circle and seeing which one fits best) Thanks, Josef. -- Josef Garvi Eden Foundation, BP 174, Zinder, Niger Republic Tel:+227 510601, Fax:+227 510263 E-Mail: josef@eden-foundation.org WWW: http://www.eden-foundation.org/