Long strings in low level graphics - wordwrap

I need to print a very long string (a whole paragraph) on a low level graphics screen.

When I use gfxTextOut(string), I get one long line, past the end of the screen, but no word wrapping.

Is there a way to handle such long strings in low level graphics?

The string works OK in Interpreter window with printf(), but that is hard to use and takes screen real estate.
Ara

Of course. There are at least three different ways of plotting/drawing text on the chart:

  1. PlotText() and PlotTextSetFont()
    https://www.amibroker.com/guide/afl/plottext.html
    https://www.amibroker.com/guide/afl/plottextsetfont.html

  2. GfxTextOut()
    https://www.amibroker.com/guide/afl/gfxtextout.html

  3. GfxDrawText()
    https://www.amibroker.com/guide/afl/gfxdrawtext.html

If you want to print text in some cell / rectangle and be able to format it, align, break the text into lines - like in the example below, you should use GfxDrawText() which takes care of all of those things automatically:

MDI%20Tab%203

4 Likes

Thanks ... it worked perfectly
Ara