Страница 1 из 1

Simple Cairo demo for Linux

СообщениеДобавлено: 07.03.2022 13: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
screenshot.png (7.92 КБ) Просмотров: 8234


Best regards from France.

Roland

Re: Simple Cairo demo for Linux

СообщениеДобавлено: 11.03.2022 11:26:33
Alexander
Thank You
Roland.

This is a progressive invention.

Re: Simple Cairo demo for Linux

СообщениеДобавлено: 12.03.2022 11:50:48
Roland
Thank you for the compliment Alexander.

Here is another example: a simple animation, using a ttimer.

screenshot.png

Re: Simple Cairo demo for Linux

СообщениеДобавлено: 19.03.2024 02:42:18
Roland
Hello everybody!

Another Cairo demo. An animated spiral. Idea coming from this example.

example7.png


Best regards from France.

Roland

Re: Simple Cairo demo for Linux

СообщениеДобавлено: 19.03.2024 13: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 20:38:41
Roland
Thank you for the code, Alexander ! Indeed, I used FPC 3.2.2.

Re: Simple Cairo demo for Linux

СообщениеДобавлено: 20.03.2024 23:39:31
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. :wink:

P.-S. In fact, no need to rebuild the IDE. It is enough to use the latest version of MSEgui.