Simple Cairo demo for Linux

Вопросы программирования и использования MSEide + MSEgui.

Модератор: Модераторы

Simple Cairo demo for Linux

Сообщение Roland » 07.03.2022 13:35:14

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 КБ) Просмотров: 6243


Best regards from France.

Roland
Вложения
msegui-cairo-demo-twindowwidget-01.zip
(6.38 КБ) Скачиваний: 226
Аватара пользователя
Roland
новенький
 
Сообщения: 23
Зарегистрирован: 23.03.2021 16:27:18
Откуда: France

Re: Simple Cairo demo for Linux

Сообщение Alexander » 11.03.2022 11:26:33

Thank You
Roland.

This is a progressive invention.
Аватара пользователя
Alexander
энтузиаст
 
Сообщения: 690
Зарегистрирован: 18.12.2005 19:10:00
Откуда: оттуда

Re: Simple Cairo demo for Linux

Сообщение Roland » 12.03.2022 11:50:48

Thank you for the compliment Alexander.

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

screenshot.png
Вложения
msegui-cairo-demo-twindowwidget-ttimer-01.zip
(6.77 КБ) Скачиваний: 223
Аватара пользователя
Roland
новенький
 
Сообщения: 23
Зарегистрирован: 23.03.2021 16:27:18
Откуда: France

Re: Simple Cairo demo for Linux

Сообщение Roland » 19.03.2024 02:42:18

Hello everybody!

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

example7.png


Best regards from France.

Roland
Вложения
example7.zip
(7.98 КБ) Скачиваний: 10
Аватара пользователя
Roland
новенький
 
Сообщения: 23
Зарегистрирован: 23.03.2021 16:27:18
Откуда: France

Re: Simple Cairo demo for Linux

Сообщение Alexander » 19.03.2024 13:12:46

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
Аватара пользователя
Alexander
энтузиаст
 
Сообщения: 690
Зарегистрирован: 18.12.2005 19:10:00
Откуда: оттуда

Re: Simple Cairo demo for Linux

Сообщение Roland » 19.03.2024 20:38:41

Thank you for the code, Alexander ! Indeed, I used FPC 3.2.2.
Аватара пользователя
Roland
новенький
 
Сообщения: 23
Зарегистрирован: 23.03.2021 16:27:18
Откуда: France

Re: Simple Cairo demo for Linux

Сообщение Roland » 20.03.2024 23:39:31

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.
Вложения
example7_510.zip
(9.42 КБ) Скачиваний: 11
Аватара пользователя
Roland
новенький
 
Сообщения: 23
Зарегистрирован: 23.03.2021 16:27:18
Откуда: France


Вернуться в MSEide + MSEgui

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

Рейтинг@Mail.ru