Is it possible to output text on multiple lines in an OBJ_TEXT object? - page 2

 
Farkhat Guzairov:

Well that would be the same as with a normal text object. Anyway, I'll use your solution for other purposes, thanks!

Not the same at all.
 
Little did Pushkin know that his pieces of his poem would be printed by an unknown machine on a strange graphic, via some kind of iCanvas... It's as if, 250 years from now, Nicholas's indicators would have been imprinted on Martian rocks by aliens from the Proxima system.
 
Nikolai Semko:
Not the same at all.

Sorry, I wasn't paying attention, I saw this construction, and then I made it up myself :), I have to try it. Is it for MQL5?

    Canvas.Comm("Ты гульлива и вольна;");
    Canvas.TextPosY+=20;                                // увеличиваем Y координату на 20 пикселей
 
Farkhat Guzairov:

Sorry, I wasn't paying attention, I saw this construction, and then I made it up myself :), I have to try it. Is it for MQL5?

Kanvas (and not only Kanvas) is 10 times faster on MQL5. But it all works for MQL4 too.

iCanvas for MQL4 -https://www.mql5.com/en/code/23840

For MQL5

- https://www.mql5.com/ru/code/22164

 
I remove the question, you have an implementation for both platforms, thanks.
 
Nikolai Semko:
Kanvas (and not only Kanvas) is 10 times faster at MQL5. But it all works for MQL4 too.

iCanvas for MQL4 -https://www.mql5.com/en/code/23840

For MQL5

- https://www.mql5.com/ru/code/22164

To clear up any doubts, there are 3 different text fragments in the example you posted. To be honest, I don't know if it is possible to edit (delete) the second text fragment, etc.?

 
Farkhat Guzairov:

To clear up any doubts, from the example that you posted, there are 3 options for the text fragment. To be honest, I don't understand if it's possible to edit (delete) the second text fragment, etc.?

Anything is possible with canvas. There are no limitations. But this is a totally different code.
Read the documentation, learn and try.
The main thing to understand is that the canvas is a uint array with size Height*Width, that Erase() removes everything, filling the background with one colour, and Update() shows the current canvas on the screen. In my example there's only one canvas for the whole screen, but there can be any number of them and of any size.
And it's very fast.
Erase takes less than a millisecond to display the whole screen.
Update in about a millisecond.
Image generation is typically 0-5 milliseconds depending on complexity.
 
Nikolai Semko:
Read the documentation, learn and try.

Hilarious )), will follow the advice!!! :)

 
Реter Konow:
Pushkin didn't know that his pieces of his poem would be printed by an unknown machine on a strange graphic, through some kind of iCanvas... It's as if, 250 years from now, Nicholas's indicators would have been imprinted on Martian rocks by aliens from the Proxima system.

Uh-huh, should have been the May Decrees of the Luminary.... )) So that 250 years later the descendants will say - nothing was ever done of them.

 
Nikolai Semko:

it's easier to use Kanvas with my iCanvas class:



To display this kind of thing using objects, the code would be much larger.

Nikolai, is there an option to align the text to the top right corner. I've been struggling for half a day... The right-hand corner is aligned, but the text is only aligned to the left side. Can you give me a hint?