[Gambas-user] Cairo
Moviga Technologies
moviga at ...3488...
Sun Mar 12 16:49:44 CET 2017
I see... Well, I wouldn't really need all the facy stuff. Latin letters
and numbers would go a long way for me.
But, I need to think a bit more about what to do then. Thanks!
Den 11.03.2017 00:44, skrev Benoît Minisini:
> Le 10/03/2017 à 22:08, Moviga Technologies a écrit :
>
>> Hi!
>>
>> What source code would be the best to study in order to learn how to use
>> the cairo component properly? I am interested in learning more about the
>> function's that allow one to refresh certain areas of the surface (clip
>> and matrix?). My long term goals for learning it in the first place is
>> to be able to first create a simple (perhaps monospaced) text editor,
>> then a formatted text rendering surface (preferably with images) and
>> lastly a rich text editor.
>>
>> Kind regards
>> Erik
>
> The gb.cairo component has almost the same API as cairo, so any cairo
> source code example can be easily transposed to Gambas. Just ask
> questions on a specific example if you encounter problems.
>
> As for making a rich text editor, cairo is not enough, as it is
> rudimentary when displaying text.
>
> You have to rely on the Pango library, but there is no "gb.pango" component.
>
> And how will you handle input?
>
> For that, you will have to use the gb.gtk component, that uses
> internally cairo and pango for the drawing, and handles the input method
> stuff for entering non ascii characters with your keyboard.
>
> It's just that the API is not the same, but simpler.
>
> Regards,
More information about the User
mailing list