[Gambas-user] Paint.DrawRichText and Paint.RichText
Benoît Minisini
g4mba5 at gmail.com
Thu Dec 19 10:53:50 CET 2019
Le 19/12/2019 à 10:43, Benoît Minisini a écrit :
> Le 19/12/2019 à 10:11, Rolf-Werner Eilert a écrit :
>>
>> Hm, can't find it, neither where you said nor in the farm. But I do
>> remember it, I looked at it some years ago, and I guess there will be
>> no answer to my question.
>>
>> What I miss is a property or a function that gives me the end
>> coordinates of the path when the text was finished. Using X and Y only
>> yields the start coordinates. DrawText or DrawRichText will paint the
>> text starting with X and Y, but afterwards the program has no control
>> about where the text in fact ends.
>>
>> It could make life a lot easier to have these coordinates, because you
>> could then simply add the next paragraph or decide to start the next
>> page.
>>
>> If there is no way how to find out, I would have the do the job
>> myself, leaving DrawRichText aside. It would mean to build my own
>> function.
>>
>> Regards
>> Rolf
>>
>
> I'm aware of that problem, but AFAIK QT and GTK+ do not provide any way
> to get this very useful information!
>
> You have to use the TextWidth() and TextHeight() method to get the size
> of a text before or after drawing it, which does the job almost twice.
>
> If anyone has more information on this subject, he's welcome!
>
> Regards,
>
It's possible with GTK+ / Pango to get the size of text just after
having drawn it. I am checking Qt now...
--
Benoît Minisini
More information about the User
mailing list