Страница 1 из 1
Simple Cairo demo for Linux
Добавлено: 07.03.2022 12:35:14
Roland
Hello!
I was looking since a long time to find a way to use the Cairo library in a MSEgui window. Today I could make a first working example, using a twindowwidget. I post it here, in case someone would be interested.
It is only for Linux.

- screenshot.png (7.92 КБ) 35982 просмотра
Best regards from France.
Roland
Re: Simple Cairo demo for Linux
Добавлено: 11.03.2022 10:26:33
Alexander
Thank You
Roland.
This is a progressive invention.
Re: Simple Cairo demo for Linux
Добавлено: 12.03.2022 10:50:48
Roland
Thank you for the compliment Alexander.
Here is another example: a simple animation, using a ttimer.
Re: Simple Cairo demo for Linux
Добавлено: 19.03.2024 01:42:18
Roland
Hello everybody!
Another Cairo demo. An animated spiral. Idea coming from
this example.
Best regards from France.
Roland
Re: Simple Cairo demo for Linux
Добавлено: 19.03.2024 12:12:46
Alexander
Thank You, Roland !
I make type casting for fpc 3.3.1 and run it.
Код: Выделить всё
scr := XDefaultScreen(XLIB.Pdisplay(msedisplay));
vis := XDefaultVisual(XLIB.Pdisplay(msedisplay), scr);
{
XClearWindow(msedisplay, sender.clientwinid);
}
sf := cairo_xlib_surface_create(XLIB.Pdisplay(msedisplay), sender.clientwinid, vis, widgetwidth, widgetheight);
http://soft.self-made-free.ru/spiral.webm
Re: Simple Cairo demo for Linux
Добавлено: 19.03.2024 19:38:41
Roland
Thank you for the code, Alexander ! Indeed, I used FPC 3.2.2.
Re: Simple Cairo demo for Linux
Добавлено: 21.03.2024 13:45:19
Roland
Dear Alexander, I better understand your message now. It seems that MSE timer is broken in latest MSEgui by mse-org. (For this project, I used my
own version.)
We are currently investigating. Sorry for the inconvenience.
Posted after 15 hours 5 minutes 48 seconds:
The bug in MSE timer has been fixed. If you want to test, please get the latest code from
the repository and build MSEide by yourself (or wait the next release coming soon).
Here is a modified version of the demo. (The type casting is no longer needed.)
Thank you Alexander for the bug report.
P.-S. In fact, no need to rebuild the IDE. It is enough to use the latest version of MSEgui.