ara1
June 12, 2018, 1:34am
1
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
Milosz
June 12, 2018, 5:26am
2
Of course. There are at least three different ways of plotting/drawing text on the chart:
PlotText() and PlotTextSetFont()
AFL Function Reference - PLOTTEXT
AFL Function Reference - PLOTTEXTSETFONT
GfxTextOut()
AFL Function Reference - GFXTEXTOUT
GfxDrawText()
AFL Function Reference - GFXDRAWTEXT
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:
4 Likes
ara1
June 12, 2018, 11:20pm
3
Thanks ... it worked perfectly
Ara